de.netseeker.ejoe.io
Class ByteBufferInputStream
java.lang.Object
java.io.InputStream
de.netseeker.ejoe.io.ByteBufferInputStream
- public class ByteBufferInputStream
- extends java.io.InputStream
Implements an input stream over a NIO ByteBuffer. The ByteBuffer is
replacable, and is supplied by an external source. This class is based on an
article found at the homepage of Michael W. Spille.
- Author:
- Michael W. Spille, netseeker aka Michael Manske
Constructor Summary |
ByteBufferInputStream(java.nio.ByteBuffer buffer)
Constructs a new ByteBufferInputStream which reads from specified buffer |
Methods inherited from class java.io.InputStream |
mark, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteBufferInputStream
public ByteBufferInputStream(java.nio.ByteBuffer buffer)
- Constructs a new ByteBufferInputStream which reads from specified buffer
setByteBuffer
public void setByteBuffer(java.nio.ByteBuffer buffer)
- Parameters:
buffer
-
available
public int available()
close
public void close()
markSupported
public boolean markSupported()
read
public int read()
read
public int read(byte[] b)
read
public int read(byte[] b,
int offset,
int length)
Copyright © 2005-2006 netseeker. All Rights Reserved.