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 public class SocketInputBuffer extends AbstractSessionInputBuffer implements EofSensor
Deprecated.(4.3) useSessionInputBufferImplSessionInputBufferimplementation bound to aSocket.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description SocketInputBuffer(java.net.Socket socket, int bufferSize, HttpParams params)Deprecated.Creates an instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected intfillBuffer()Deprecated.booleanisDataAvailable(int timeout)Deprecated.Blocks until some data becomes available in the session buffer or the given timeout period in milliseconds elapses.booleanisEof()Deprecated.-
Methods inherited from class org.apache.http.impl.io.AbstractSessionInputBuffer
available, capacity, createTransportMetrics, getMetrics, hasBufferedData, init, length, read, read, read, readLine, readLine
-
-
-
-
Constructor Detail
-
SocketInputBuffer
public SocketInputBuffer(java.net.Socket socket, int bufferSize, HttpParams params) throws java.io.IOExceptionDeprecated.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 than0it is set to the value ofSocket.getReceiveBufferSize(). If resultant number is less than1024it is set to1024.params- HTTP parameters.- Throws:
java.io.IOException
-
-
Method Detail
-
fillBuffer
protected int fillBuffer() throws java.io.IOExceptionDeprecated.- Overrides:
fillBufferin classAbstractSessionInputBuffer- Throws:
java.io.IOException
-
isDataAvailable
public boolean isDataAvailable(int timeout) throws java.io.IOExceptionDeprecated.Description copied from interface:SessionInputBufferBlocks until some data becomes available in the session buffer or the given timeout period in milliseconds elapses. If the timeout value is0this method blocks indefinitely.- Specified by:
isDataAvailablein interfaceSessionInputBuffer- Parameters:
timeout- in milliseconds.- Returns:
trueif some data is available in the session buffer orfalseotherwise.- Throws:
java.io.IOException- if an I/O error occurs.
-
-