Package org.apache.http.impl.io
Class SocketInputBuffer
java.lang.Object
org.apache.http.impl.io.AbstractSessionInputBuffer
org.apache.http.impl.io.SocketInputBuffer
- All Implemented Interfaces:
BufferInfo
,EofSensor
,SessionInputBuffer
Deprecated.
SessionInputBuffer
implementation
bound to a Socket
.- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSocketInputBuffer
(Socket socket, int bufferSize, HttpParams params) Deprecated.Creates an instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
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.Methods inherited from class org.apache.http.impl.io.AbstractSessionInputBuffer
available, capacity, createTransportMetrics, getMetrics, hasBufferedData, init, length, read, read, read, readLine, readLine
-
Field Details
-
socket
Deprecated. -
eof
private boolean eofDeprecated.
-
-
Constructor Details
-
SocketInputBuffer
Deprecated.Creates an instance of this class.- Parameters:
socket
- the socket to read data from.bufferSize
- the size of the internal buffer. If this number is less than0
it is set to the value ofSocket.getReceiveBufferSize()
. If resultant number is less than1024
it is set to1024
.params
- HTTP parameters.- Throws:
IOException
-
-
Method Details
-
fillBuffer
Deprecated.- Overrides:
fillBuffer
in classAbstractSessionInputBuffer
- Throws:
IOException
-
isDataAvailable
Deprecated.Description copied from interface:SessionInputBuffer
Blocks until some data becomes available in the session buffer or the given timeout period in milliseconds elapses. If the timeout value is0
this method blocks indefinitely.- Specified by:
isDataAvailable
in interfaceSessionInputBuffer
- Parameters:
timeout
- in milliseconds.- Returns:
true
if some data is available in the session buffer orfalse
otherwise.- Throws:
IOException
- if an I/O error occurs.
-
isEof
public boolean isEof()Deprecated.
-
SessionInputBufferImpl