com.threerings.io
Class ByteBufferInputStream
java.lang.Object
java.io.InputStream
com.threerings.io.ByteBufferInputStream
- All Implemented Interfaces:
- Closeable
public class ByteBufferInputStream
- extends InputStream
Reads input from a ByteBuffer.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_buffer
protected ByteBuffer _buffer
- The buffer from which we read.
ByteBufferInputStream
public ByteBufferInputStream(ByteBuffer buffer)
- Creates a new input stream to read from the specified buffer.
getBuffer
public ByteBuffer getBuffer()
- Returns a reference to the underlying buffer.
read
public int read()
- Specified by:
read in class InputStream
read
public int read(byte[] b,
int offset,
int length)
throws IOException
- Overrides:
read in class InputStream
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Overrides:
skip in class InputStream
- Throws:
IOException
available
public int available()
- Overrides:
available in class InputStream
markSupported
public boolean markSupported()
- Overrides:
markSupported in class InputStream
mark
public void mark(int readLimit)
- Overrides:
mark in class InputStream
reset
public void reset()
throws IOException
- Overrides:
reset in class InputStream
- Throws:
IOException