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:
SessionInputBuffer
public class SocketInputBuffer extends AbstractSessionInputBuffer
Socket bound session input buffer.- Since:
- 4.0
- Version:
- $Revision: 560358 $
- Author:
- Oleg Kalnichevski
-
Constructor Summary
Constructors Constructor Description SocketInputBuffer(Socket socket, int buffersize, HttpParams params) -
Method Summary
Modifier and Type Method Description booleanisDataAvailable(int timeout)booleanisStale()Returns true if the connection is probably functional.Methods inherited from class org.apache.http.impl.io.AbstractSessionInputBuffer
fillBuffer, getMetrics, hasBufferedData, init, read, read, read, readLine, readLine
-
Constructor Details
-
SocketInputBuffer
- Throws:
IOException
-
-
Method Details
-
isDataAvailable
- Throws:
IOException
-
isStale
Returns true if the connection is probably functional. It's insufficient to rely on isDataAvailable() returning normally; that approach cannot distinguish between an exhausted stream and a stream with zero bytes buffered.- Throws:
IOException
-