Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.http.impl.io
Class AbstractHttpDataReceiver  view AbstractHttpDataReceiver download AbstractHttpDataReceiver.java

java.lang.Object
  extended byorg.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.


Field Summary
private  boolean ascii
           
private  byte[] buffer
           
private  int bufferlen
           
private  int bufferpos
           
private  java.lang.String charset
           
private  java.io.InputStream instream
           
private  org.apache.http.io.ByteArrayBuffer linebuffer
           
private  int maxLineLen
           
 
Constructor Summary
AbstractHttpDataReceiver()
           
 
Method Summary
protected  int fillBuffer()
           
protected  boolean hasBufferedData()
           
protected  void init(java.io.InputStream instream, int buffersize)
           
private  int lineFromLineBuffer(org.apache.http.io.CharArrayBuffer charbuffer)
           
private  int lineFromReadBuffer(org.apache.http.io.CharArrayBuffer charbuffer, int pos)
           
private  int locateLF()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 java.lang.String readLine()
           
 int readLine(org.apache.http.io.CharArrayBuffer charbuffer)
           
 void reset(org.apache.http.params.HttpParams params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.io.HttpDataReceiver
isDataAvailable
 

Field Detail

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
Constructor Detail

AbstractHttpDataReceiver

public AbstractHttpDataReceiver()
Method Detail

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