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
intavailable()
voidclose()
voiddestroy()
ByteBuffergetBuffer()
Get a buffer to write to this InputStream.
longgetTimeout()
getSoTimeout.
voidmark(int arg0)
booleanmarkSupported()
intread()
intread(byte[] buf, int offset, int length)
intread(byte[] buf)
voidrecycle(ByteBuffer buf)
voidreset()
voidsetTimeout(long l)
setSoTimeout.
longskip(long length)
voidwrite(ByteBuffer buffer)

Constructor Detail

ByteBufferInputStream

public ByteBufferInputStream(int bufferSize)
Constructor.

Method Detail

available

public int available()

close

public void close()

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()

read

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

read

public int read(byte[] buf)

recycle

public void recycle(ByteBuffer buf)

reset

public void reset()

setTimeout

public void setTimeout(long l)
setSoTimeout.

Parameters: l

skip

public long skip(long length)

See Also: java.io.InputStream#skip(long)

write

public void write(ByteBuffer buffer)
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.