org.apache.http.nio.util
Class SharedInputBuffer

java.lang.Object
  extended by org.apache.http.nio.util.ExpandableBuffer
      extended by org.apache.http.nio.util.SharedInputBuffer
All Implemented Interfaces:
BufferInfo, ContentInputBuffer

public class SharedInputBuffer
extends ExpandableBuffer
implements ContentInputBuffer


Field Summary
 
Fields inherited from class org.apache.http.nio.util.ExpandableBuffer
buffer, INPUT_MODE, OUTPUT_MODE
 
Constructor Summary
SharedInputBuffer(int buffersize, IOControl ioctrl, ByteBufferAllocator allocator)
           
 
Method Summary
 int consumeContent(ContentDecoder decoder)
           
protected  boolean isEndOfStream()
           
protected  boolean isShutdown()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 void shutdown()
           
protected  void waitForData()
           
 
Methods inherited from class org.apache.http.nio.util.ExpandableBuffer
available, capacity, clear, ensureCapacity, expand, getMode, hasData, length, setInputMode, setOutputMode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SharedInputBuffer

public SharedInputBuffer(int buffersize,
                         IOControl ioctrl,
                         ByteBufferAllocator allocator)
Method Detail

reset

public void reset()
Specified by:
reset in interface ContentInputBuffer

consumeContent

public int consumeContent(ContentDecoder decoder)
                   throws java.io.IOException
Specified by:
consumeContent in interface ContentInputBuffer
Throws:
java.io.IOException

waitForData

protected void waitForData()
                    throws java.io.IOException
Throws:
java.io.IOException

shutdown

public void shutdown()

isShutdown

protected boolean isShutdown()

isEndOfStream

protected boolean isEndOfStream()

read

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

read

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

read

public int read(byte[] b)
         throws java.io.IOException
Throws:
java.io.IOException


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