BufferInfo, EofSensor, SessionInputBufferSessionInputBufferImpl@Deprecated public class SocketInputBuffer extends AbstractSessionInputBuffer implements EofSensor
SessionInputBuffer implementation
bound to a Socket.| Constructor | Description |
|---|---|
SocketInputBuffer(java.net.Socket socket,
int buffersize,
HttpParams params) |
Deprecated.
Creates an instance of this class.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected int |
fillBuffer() |
Deprecated.
|
boolean |
isDataAvailable(int timeout) |
Deprecated.
Blocks until some data becomes available in the session buffer or the
given timeout period in milliseconds elapses.
|
boolean |
isEof() |
Deprecated.
|
available, capacity, createTransportMetrics, getMetrics, hasBufferedData, init, length, read, read, read, readLine, readLinepublic SocketInputBuffer(java.net.Socket socket,
int buffersize,
HttpParams params)
throws java.io.IOException
socket - the socket to read data from.buffersize - the size of the internal buffer. If this number is less
than 0 it is set to the value of
Socket.getReceiveBufferSize(). If resultant number is less
than 1024 it is set to 1024.params - HTTP parameters.java.io.IOExceptionprotected int fillBuffer()
throws java.io.IOException
fillBuffer in class AbstractSessionInputBufferjava.io.IOExceptionpublic boolean isDataAvailable(int timeout)
throws java.io.IOException
SessionInputBuffer0 this method blocks indefinitely.isDataAvailable in interface SessionInputBuffertimeout - in milliseconds.true if some data is available in the session
buffer or false otherwise.java.io.IOException - if an I/O error occurs.