net.noderunner.http
Class ClientResponse

java.lang.Object
  extended by net.noderunner.http.Response
      extended by net.noderunner.http.ClientResponse

public class ClientResponse
extends Response

Contains the contents of an HTTP response message. In RFC 2616 terms, this object represents data found in the Response body.


Constructor Summary
ClientResponse(java.io.InputStream is)
          Constructs a ClientResponseImpl by parsing an input stream.
 
Method Summary
 java.io.InputStream getInputStream()
          Returns a stream for reading data from the HTTP server.
 int readFully()
          Reads a response's input stream until EOF.
 java.lang.String toString()
          Returns a debug string showing the response information contained within.
 
Methods inherited from class net.noderunner.http.Response
getHeaders, getStatusLine, isContinue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientResponse

public ClientResponse(java.io.InputStream is)
               throws java.io.IOException
Constructs a ClientResponseImpl by parsing an input stream.

Throws:
java.io.IOException
Method Detail

getInputStream

public java.io.InputStream getInputStream()
Returns a stream for reading data from the HTTP server.


readFully

public int readFully()
              throws java.io.IOException
Reads a response's input stream until EOF. Returns the number of bytes read. If the server indicates the connection was closed, does nothing.

Throws:
java.io.IOException

toString

public java.lang.String toString()
Returns a debug string showing the response information contained within.

Overrides:
toString in class Response


Copyright © 2010. All Rights Reserved.