org.mortbay.http.nio
Class ByteBufferInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.mortbay.http.nio.ByteBufferInputStream

public class ByteBufferInputStream
extends java.io.InputStream

Version:
$Revision: 1.5 $
Author:
gregw

Constructor Summary
ByteBufferInputStream(int bufferSize)
          Constructor.
 
Method Summary
 int available()
           
 void close()
           
 void destroy()
           
 java.nio.ByteBuffer getBuffer()
          Get a buffer to write to this InputStream.
 long getTimeout()
          getSoTimeout.
 void mark(int arg0)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] buf)
           
 int read(byte[] buf, int offset, int length)
           
 void recycle(java.nio.ByteBuffer buf)
           
 void reset()
           
 void setTimeout(long l)
          setSoTimeout.
 long skip(long length)
           
 void write(java.nio.ByteBuffer buffer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferInputStream

public ByteBufferInputStream(int bufferSize)
Constructor.

Method Detail

getTimeout

public long getTimeout()
getSoTimeout.

Returns:

setTimeout

public void setTimeout(long l)
setSoTimeout.

Parameters:
l -

read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

available

public int available()
              throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

mark

public void mark(int arg0)

markSupported

public boolean markSupported()

read

public int read(byte[] buf,
                int offset,
                int length)
         throws java.io.IOException
Throws:
java.io.IOException

read

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

reset

public void reset()
           throws java.io.IOException
Throws:
java.io.IOException

skip

public long skip(long length)
          throws java.io.IOException
Throws:
java.io.IOException
See Also:
InputStream.skip(long)

write

public void write(java.nio.ByteBuffer buffer)

getBuffer

public java.nio.ByteBuffer getBuffer()
Get a buffer to write to this InputStream. The buffer wll either be a new direct buffer or a recycled buffer.


recycle

public void recycle(java.nio.ByteBuffer buf)

destroy

public void destroy()


Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.