org.mortbay.http.nio

Class ByteBufferInputStream


public class ByteBufferInputStream
extends InputStream

Version:
$Revision: 1.5 $
Author:
gregw

Constructor Summary

ByteBufferInputStream(int bufferSize)
Constructor.

Method Summary

int
available()
void
close()
void
destroy()
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(ByteBuffer buf)
void
reset()
void
setTimeout(long l)
setSoTimeout.
long
skip(long length)
void
write(ByteBuffer buffer)

Constructor Details

ByteBufferInputStream

public ByteBufferInputStream(int bufferSize)
Constructor.

Method Details

available

public int available()
            throws IOException

close

public void close()
            throws IOException

destroy

public void destroy()

getBuffer

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

getTimeout

public long getTimeout()
getSoTimeout.
Returns:

mark

public void mark(int arg0)

markSupported

public boolean markSupported()

read

public int read()
            throws IOException

read

public int read(byte[] buf)
            throws IOException

read

public int read(byte[] buf,
                int offset,
                int length)
            throws IOException

recycle

public void recycle(ByteBuffer buf)

reset

public void reset()
            throws IOException

setTimeout

public void setTimeout(long l)
setSoTimeout.
Parameters:
l -

skip

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

write

public void write(ByteBuffer buffer)

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