HTTPClient
Class ResponseHandler
java.lang.Object
|
+--HTTPClient.ResponseHandler
- final class ResponseHandler
- extends java.lang.Object
This holds various information about an active response. Used by the
StreamDemultiplexor and RespInputStream.
- Since:
- V0.2
| Type | Field |
(package private) boolean |
eof
signals that the demux has closed the response stream, and that
therefore no more data can be read |
(package private) java.io.IOException |
exception
this is non-null if the stream has an exception pending |
(package private) Request |
request
the response class |
(package private) Response |
resp
the response class |
(package private) RespInputStream |
stream
the response stream |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stream
RespInputStream stream
- the response stream
resp
Response resp
- the response class
request
Request request
- the response class
eof
boolean eof
- signals that the demux has closed the response stream, and that
therefore no more data can be read
exception
java.io.IOException exception
- this is non-null if the stream has an exception pending
ResponseHandler
ResponseHandler(Response resp,
Request request,
StreamDemultiplexor demux)
- Creates a new handler. This also allocates the response input
stream.
- Parameters:
resp - the reponserequest - the requestdemux - our stream demultiplexor.
getEndBoundary
byte[] getEndBoundary(BufferedInputStream MasterStream)
throws java.io.IOException,
ParseException
- return the boundary string for this response. Set's up the
InputStream buffer if neccessary.
- Parameters:
MasterStream - the input stream from which the stream demux
is reading.- Returns:
- the boundary string.
getEndCompiled
int[] getEndCompiled(BufferedInputStream MasterStream)
throws java.io.IOException,
ParseException
- return the compilation of the boundary string for this response.
Set's up the InputStream buffer if neccessary.
- Parameters:
MasterStream - the input stream from which the stream demux
is reading.- Returns:
- the compiled boundary string.
setupBoundary
void setupBoundary(BufferedInputStream MasterStream)
throws java.io.IOException,
ParseException
- Gets the boundary string, compiles it for searching, and initializes
the buffered input stream.