public class ByteChannelReader
extends java.lang.Object
| Constructor and Description |
|---|
ByteChannelReader(java.nio.channels.ReadableByteChannel readableByteChannel) |
ByteChannelReader(java.nio.channels.ReadableByteChannel readableByteChannel,
int bufferLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureData(int length) |
byte |
get() |
byte |
get(int offset) |
java.nio.ByteBuffer |
getBuffer() |
boolean |
hasRemaining() |
void |
maybeRead(int length) |
void |
read(int length) |
int |
remaining() |
void |
resizeBuffer(int minBufferLength) |
int |
skip(int length) |
public ByteChannelReader(java.nio.channels.ReadableByteChannel readableByteChannel)
throws java.io.IOException
java.io.IOExceptionpublic ByteChannelReader(java.nio.channels.ReadableByteChannel readableByteChannel,
int bufferLength)
throws java.io.IOException
java.io.IOExceptionpublic void ensureData(int length)
throws java.io.IOException
java.io.IOExceptionpublic byte get()
public byte get(int offset)
public java.nio.ByteBuffer getBuffer()
public boolean hasRemaining()
public void maybeRead(int length)
throws java.io.IOException
java.io.IOExceptionpublic void read(int length)
throws java.io.IOException
java.io.IOExceptionpublic int remaining()
public void resizeBuffer(int minBufferLength)
public int skip(int length)