Class HttpResponse

  • Direct Known Subclasses:
    GatekeeperReply

    public class HttpResponse
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpResponse​(java.io.InputStream in)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getRest​(java.lang.String line)  
      void parseHttp​(java.lang.String line)  
      protected java.lang.String readLine​(java.io.InputStream in)
      Read a line of text from the given Stream and return it as a String.
      java.lang.String toString()
      Generates a string representation of the http header
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • input

        protected java.io.InputStream input
      • charsRead

        protected long charsRead
      • httpType

        public java.lang.String httpType
      • httpMsg

        public java.lang.String httpMsg
      • httpCode

        public int httpCode
      • contentLength

        public long contentLength
      • connection

        public java.lang.String connection
      • contentType

        public java.lang.String contentType
      • server

        public java.lang.String server
      • chunked

        public boolean chunked
      • location

        public java.lang.String location
    • Constructor Detail

      • HttpResponse

        public HttpResponse​(java.io.InputStream in)
                     throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • readLine

        protected java.lang.String readLine​(java.io.InputStream in)
                                     throws java.io.IOException
        Read a line of text from the given Stream and return it as a String. Assumes lines end in CRLF.
        Throws:
        java.io.IOException
      • getRest

        public static java.lang.String getRest​(java.lang.String line)
      • parseHttp

        public void parseHttp​(java.lang.String line)
      • toString

        public java.lang.String toString()
        Generates a string representation of the http header
        Overrides:
        toString in class java.lang.Object
        Returns:
        String a string representation of the http header