org.apache.http.impl.io
Class AbstractHttpDataReceiver

java.lang.Object
  extended byorg.apache.http.impl.io.AbstractHttpDataReceiver
All Implemented Interfaces:
HttpDataReceiver
Direct Known Subclasses:
SocketHttpDataReceiver

public abstract class AbstractHttpDataReceiver
extends java.lang.Object
implements HttpDataReceiver

Abstract base class for data receivers using traditional IO.

Author:
Oleg Kalnichevski

Constructor Summary
AbstractHttpDataReceiver()
           
 
Method Summary
protected  int fillBuffer()
           
protected  boolean hasBufferedData()
           
protected  void init(java.io.InputStream instream, int buffersize)
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 java.lang.String readLine()
           
 int readLine(CharArrayBuffer charbuffer)
           
 void reset(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
 

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
Throws:
java.io.IOException

hasBufferedData

protected boolean hasBufferedData()

read

public int read()
         throws java.io.IOException
Specified by:
read in interface HttpDataReceiver
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Specified by:
read in interface HttpDataReceiver
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Specified by:
read in interface HttpDataReceiver
Throws:
java.io.IOException

readLine

public int readLine(CharArrayBuffer charbuffer)
             throws java.io.IOException
Specified by:
readLine in interface HttpDataReceiver
Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Specified by:
readLine in interface HttpDataReceiver
Throws:
java.io.IOException

reset

public void reset(HttpParams params)
Specified by:
reset in interface HttpDataReceiver


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.