public class ResponseInputStream
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.io.BufferedInputStream |
bin |
private static int |
incrementSlop |
private static int |
maxIncrement |
private static int |
minIncrement |
Constructor and Description |
---|
ResponseInputStream(java.io.InputStream in)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
How much buffered data do we have?
|
ByteArray |
readResponse()
Read a Response from the InputStream.
|
ByteArray |
readResponse(ByteArray ba)
Read a Response from the InputStream.
|
private static final int minIncrement
private static final int maxIncrement
private static final int incrementSlop
private java.io.BufferedInputStream bin
public ResponseInputStream(java.io.InputStream in)
in
- the InputStream to wrappublic ByteArray readResponse() throws java.io.IOException
java.io.IOException
- for I/O errorspublic ByteArray readResponse(ByteArray ba) throws java.io.IOException
ba
- the ByteArray in which to store the response, or nulljava.io.IOException
- for I/O errorspublic int available() throws java.io.IOException
java.io.IOException
- if the stream has been closed