org.globus.util.http
Class HttpResponse

java.lang.Object
  extended by org.globus.util.http.HttpResponse

public class HttpResponse
extends java.lang.Object


Field Summary
protected  long charsRead
           
 boolean chunked
           
 java.lang.String connection
           
 long contentLength
           
 java.lang.String contentType
           
 int httpCode
           
 java.lang.String httpMsg
           
 java.lang.String httpType
           
protected  java.io.InputStream input
           
 java.lang.String location
           
 java.lang.String server
           
 
Constructor Summary
HttpResponse(java.io.InputStream in)
           
 
Method Summary
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