org.apache.http.impl.io
Class AbstractSessionInputBuffer

java.lang.Object
  extended by org.apache.http.impl.io.AbstractSessionInputBuffer
All Implemented Interfaces:
SessionInputBuffer
Direct Known Subclasses:
SocketInputBuffer

public abstract class AbstractSessionInputBuffer
extends java.lang.Object
implements SessionInputBuffer

Abstract base class for session input buffers that stream data from a InputStream.

Author:
Oleg Kalnichevski

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

Constructor Detail

AbstractSessionInputBuffer

public AbstractSessionInputBuffer()
Method Detail

init

protected void init(java.io.InputStream instream,
                    int buffersize,
                    HttpParams params)

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

read

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

read

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

readLine

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

readLine

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

getMetrics

public HttpTransportMetrics getMetrics()
Specified by:
getMetrics in interface SessionInputBuffer


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