SessionInputBufferImpl@NotThreadSafe @Deprecated public class SocketInputBuffer extends AbstractSessionInputBuffer implements EofSensor
SessionInputBuffer implementation
bound to a Socket.| 构造器和说明 |
|---|
SocketInputBuffer(java.net.Socket socket,
int buffersize,
HttpParams params)
已过时。
Creates an instance of this class.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
fillBuffer()
已过时。
|
boolean |
isDataAvailable(int timeout)
已过时。
Blocks until some data becomes available in the session buffer or the
given timeout period in milliseconds elapses.
|
boolean |
isEof()
已过时。
|
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 在类中 AbstractSessionInputBufferjava.io.IOExceptionpublic boolean isDataAvailable(int timeout)
throws java.io.IOException
SessionInputBuffer0 this method blocks indefinitely.isDataAvailable 在接口中 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.