java.lang.Object
org.apache.http.impl.io.AbstractHttpDataReceiver
- All Implemented Interfaces:
- org.apache.http.io.HttpDataReceiver
- Direct Known Subclasses:
- SocketHttpDataReceiver
- public abstract class AbstractHttpDataReceiver
- extends java.lang.Object
- implements org.apache.http.io.HttpDataReceiver
Abstract base class for data receivers using traditional IO.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instream
private java.io.InputStream instream
buffer
private byte[] buffer
bufferpos
private int bufferpos
bufferlen
private int bufferlen
linebuffer
private org.apache.http.io.ByteArrayBuffer linebuffer
charset
private java.lang.String charset
ascii
private boolean ascii
maxLineLen
private int maxLineLen
AbstractHttpDataReceiver
public AbstractHttpDataReceiver()
init
protected void init(java.io.InputStream instream,
int buffersize)
fillBuffer
protected int fillBuffer()
throws java.io.IOException
hasBufferedData
protected boolean hasBufferedData()
read
public int read()
throws java.io.IOException
- Specified by:
read in interface org.apache.http.io.HttpDataReceiver
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Specified by:
read in interface org.apache.http.io.HttpDataReceiver
read
public int read(byte[] b)
throws java.io.IOException
- Specified by:
read in interface org.apache.http.io.HttpDataReceiver
locateLF
private int locateLF()
readLine
public int readLine(org.apache.http.io.CharArrayBuffer charbuffer)
throws java.io.IOException
- Specified by:
readLine in interface org.apache.http.io.HttpDataReceiver
lineFromLineBuffer
private int lineFromLineBuffer(org.apache.http.io.CharArrayBuffer charbuffer)
throws java.io.IOException
lineFromReadBuffer
private int lineFromReadBuffer(org.apache.http.io.CharArrayBuffer charbuffer,
int pos)
throws java.io.IOException
readLine
public java.lang.String readLine()
throws java.io.IOException
- Specified by:
readLine in interface org.apache.http.io.HttpDataReceiver
reset
public void reset(org.apache.http.params.HttpParams params)
- Specified by:
reset in interface org.apache.http.io.HttpDataReceiver