Class XiHttpResponseImpl

  • All Implemented Interfaces:
    org.xipki.util.http.XiHttpResponse

    public class XiHttpResponseImpl
    extends java.lang.Object
    implements org.xipki.util.http.XiHttpResponse
    HTTP response wrapper.
    Author:
    Lijun Liao (xipki)
    • Constructor Summary

      Constructors 
      Constructor Description
      XiHttpResponseImpl​(javax.servlet.http.HttpServletResponse resp)  
    • Constructor Detail

      • XiHttpResponseImpl

        public XiHttpResponseImpl​(javax.servlet.http.HttpServletResponse resp)
    • Method Detail

      • setStatus

        public void setStatus​(int sc)
        Specified by:
        setStatus in interface org.xipki.util.http.XiHttpResponse
      • sendError

        public void sendError​(int sc)
                       throws java.io.IOException
        Specified by:
        sendError in interface org.xipki.util.http.XiHttpResponse
        Throws:
        java.io.IOException
      • setContentType

        public void setContentType​(java.lang.String type)
        Specified by:
        setContentType in interface org.xipki.util.http.XiHttpResponse
      • addHeader

        public void addHeader​(java.lang.String name,
                              java.lang.String value)
        Specified by:
        addHeader in interface org.xipki.util.http.XiHttpResponse
      • setHeader

        public void setHeader​(java.lang.String name,
                              java.lang.String value)
        Specified by:
        setHeader in interface org.xipki.util.http.XiHttpResponse
      • setContentLength

        public void setContentLength​(int len)
        Specified by:
        setContentLength in interface org.xipki.util.http.XiHttpResponse
      • getOutputStream

        public java.io.OutputStream getOutputStream()
                                             throws java.io.IOException
        Specified by:
        getOutputStream in interface org.xipki.util.http.XiHttpResponse
        Throws:
        java.io.IOException