org.edg.security.httpclient
Class GenericResponse

java.lang.Object
  |
  +--org.edg.security.httpclient.GenericResponse

public class GenericResponse
extends java.lang.Object

Class used to store various fields of the HTTP response sent by the HTTP server.

Author:
Gian Luca Volpato

Constructor Summary
GenericResponse()
           
 
Method Summary
 java.io.InputStream getBody()
          Returns the complete body content of the HTTP response
 java.io.InputStream getHeaders()
          Returns the headers of the HTTP response
 java.lang.String getResultCode()
          Returns the Status Code, Reason and HTTP Version of the HTTP response
protected  void setBody(java.io.ByteArrayOutputStream totalBody)
           
protected  void setHeaders(java.io.ByteArrayOutputStream head)
           
protected  void setResultCode(java.lang.String code)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericResponse

public GenericResponse()
Method Detail

setResultCode

protected void setResultCode(java.lang.String code)

setHeaders

protected void setHeaders(java.io.ByteArrayOutputStream head)

setBody

protected void setBody(java.io.ByteArrayOutputStream totalBody)

getResultCode

public java.lang.String getResultCode()
Returns the Status Code, Reason and HTTP Version of the HTTP response

Returns:
String containing the Status Code, the Reason Line and the HTTP Version supported by the server.

getHeaders

public java.io.InputStream getHeaders()
Returns the headers of the HTTP response

Returns:
InputStream containing all the headers included in the HTTP response. Null if there are no headers.

getBody

public java.io.InputStream getBody()
Returns the complete body content of the HTTP response

Returns:
InputStream containing the complete body of the HTTP Response. Null if the response is empty.