Class HttpResponse

    • Constructor Detail

      • HttpResponse

        public HttpResponse()
      • HttpResponse

        protected HttpResponse​(HttpResponse httpResponse)
    • Method Detail

      • getResponseCode

        public java.lang.Integer getResponseCode()
        Return the numeric code that represents the status of the http request.
        Returns:
        Response code.
      • setResponseCode

        public void setResponseCode​(java.lang.Integer responseCode)
        Set the numeric code that represents the status of the http request.
        Parameters:
        responseCode - Response code.
      • getReasonPhrase

        public java.lang.String getReasonPhrase()
        Return a phrase that represents why the server response with this package.
        Returns:
        Reason phrase.
      • setReasonPhrase

        public void setReasonPhrase​(java.lang.String reasonPhrase)
        Set a phrase that represents why the server response with this package.
        Parameters:
        reasonPhrase - Reason phrase.
      • processBody

        protected void processBody()
        This kind of http package never process his body.
        Specified by:
        processBody in class HttpPackage
      • processFirstLine

        protected void processFirstLine​(java.lang.String firstLine)
        Set the values of the first line of the package.
        Specified by:
        processFirstLine in class HttpPackage
        Parameters:
        firstLine - String representation of the firs line.
      • getProtocolHeader

        public byte[] getProtocolHeader()
        Return the byte array that represents the http package header.
        Specified by:
        getProtocolHeader in class HttpPackage
        Returns:
        Byte array.
      • toString

        public java.lang.String toString()
        Create the standard representation of the http response package.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String representation of the package