com.flat502.rox.http
Class HttpResponseBuffer

java.lang.Object
  extended by com.flat502.rox.http.HttpMessageBuffer
      extended by com.flat502.rox.http.HttpResponseBuffer

public class HttpResponseBuffer
extends HttpMessageBuffer

This class represents a buffer built up from one or more network messages, and containing an HTTP response.


Constructor Summary
HttpResponseBuffer(HttpRpcClient client, java.net.Socket socket)
           
HttpResponseBuffer(HttpRpcClient client, java.net.Socket socket, Encoding acceptableEncoding)
           
 
Method Summary
 java.io.InputStream getContentStream()
           
 double getHttpVersion()
           
 java.lang.String getHttpVersionString()
           
 java.lang.String getReasonPhrase()
           
 int getStatusCode()
           
 boolean mustCloseConnection()
           
 java.lang.String toString()
           
protected  void unpackPreamble(java.lang.String line)
           
protected  void validateHeaders()
           
 
Methods inherited from class com.flat502.rox.http.HttpMessageBuffer
addBytes, getContent, getContentCharset, getContentReader, getContentType, getHeaders, getHeaderValue, getOrigin, getSocket, isComplete, normalizeHeaderName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpResponseBuffer

public HttpResponseBuffer(HttpRpcClient client,
                          java.net.Socket socket)

HttpResponseBuffer

public HttpResponseBuffer(HttpRpcClient client,
                          java.net.Socket socket,
                          Encoding acceptableEncoding)
Method Detail

unpackPreamble

protected void unpackPreamble(java.lang.String line)
                       throws java.lang.Exception
Specified by:
unpackPreamble in class HttpMessageBuffer
Throws:
java.lang.Exception

getHttpVersion

public double getHttpVersion()
Specified by:
getHttpVersion in class HttpMessageBuffer

getHttpVersionString

public java.lang.String getHttpVersionString()
Specified by:
getHttpVersionString in class HttpMessageBuffer

mustCloseConnection

public boolean mustCloseConnection()

getReasonPhrase

public java.lang.String getReasonPhrase()

getStatusCode

public int getStatusCode()

getContentStream

public java.io.InputStream getContentStream()
                                     throws java.io.IOException
Overrides:
getContentStream in class HttpMessageBuffer
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class HttpMessageBuffer

validateHeaders

protected void validateHeaders()
                        throws HttpBufferException
Overrides:
validateHeaders in class HttpMessageBuffer
Throws:
HttpBufferException