xsul.http_client
Class HttpClientResponse

java.lang.Object
  extended byxsul.http_client.HttpClientResponse

public class HttpClientResponse
extends java.lang.Object

This class represents response from HTTP server. It is ooptimzied for small memory footprint.

Version:
$Revision: 1.9 $
Author:
Aleksander Slominski

Method Summary
 java.io.InputStream getBodyInputStream()
           
 int getContentLength()
          Returns -1 if Content-Length header was not present in response.
 java.lang.String getContentType()
           
 java.lang.String getHeader(java.lang.String name)
          Return value of header with given name or null if such header does not exist.
 int getHeaderCount()
           
 java.util.Enumeration getHeaderNames()
           
 java.lang.String getHttpVersion()
           
 java.lang.String getReasonPhrase()
           
 java.lang.String getStatusCode()
           
 void readHeaders()
           
 void readStatusLine()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

readStatusLine

public void readStatusLine()
                    throws HttpClientException
Throws:
HttpClientException

getHttpVersion

public java.lang.String getHttpVersion()
                                throws HttpClientException
Throws:
HttpClientException

getStatusCode

public java.lang.String getStatusCode()
                               throws HttpClientException
Throws:
HttpClientException

getReasonPhrase

public java.lang.String getReasonPhrase()
                                 throws HttpClientException
Throws:
HttpClientException

readHeaders

public void readHeaders()
                 throws HttpClientException
Throws:
HttpClientException

getHeaderCount

public int getHeaderCount()
                   throws HttpClientException
Throws:
HttpClientException

getHeader

public java.lang.String getHeader(java.lang.String name)
                           throws HttpClientException
Return value of header with given name or null if such header does not exist.

Throws:
HttpClientException

getHeaderNames

public java.util.Enumeration getHeaderNames()
                                     throws HttpClientException
Throws:
HttpClientException

getContentType

public java.lang.String getContentType()
                                throws HttpClientException
Throws:
HttpClientException

getContentLength

public int getContentLength()
                     throws HttpClientException
Returns -1 if Content-Length header was not present in response.

Throws:
HttpClientException

getBodyInputStream

public java.io.InputStream getBodyInputStream()
                                       throws HttpClientException
Throws:
HttpClientException


IU Extreme! Lab (http://www.extreme.indiana.edu)