public class ChannelBufferUnsafeDataInputStream extends ChannelBufferUnsafeInputStream implements DataInput
UnsafeHolder.hasUnsafe() returns true.
The implementation is not thread-safe by design. This particular class can be used as an efficient, buffered DataInput implementation for file channels, socket channels and other similar.
addrLimit, addrPosition, baseAddress, bufferbytesRead, channel, PARK_NANOS_MAX, parkedThread| Constructor and Description |
|---|
ChannelBufferUnsafeDataInputStream(ReadableByteChannel channel) |
ChannelBufferUnsafeDataInputStream(ReadableByteChannel channel,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
long |
skip(long n) |
int |
skipBytes(int n) |
allocateBuffer, available, close, isOpen, read, read, read, read, readInt, refillBuffer, resetBufferPositionsgetBytesRead, getParkedThread, getUnderlyingChannel, readBuffered, readFrame, readFrameFragment, readIntoBuffer, readIntoBufferNonBlocking, refillBufferBase, resetAndCopyLeftOverBytesmark, markSupported, resetpublic ChannelBufferUnsafeDataInputStream(ReadableByteChannel channel)
public ChannelBufferUnsafeDataInputStream(ReadableByteChannel channel, int bufferSize)
public final void readFully(@Nonnull byte[] b) throws IOException
readFully in interface DataInputIOExceptionpublic final void readFully(@Nonnull byte[] b, int off, int len) throws IOException
readFully in interface DataInputIOExceptionpublic long skip(long n)
skip in class InputStreampublic final boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic final byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic final int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic final short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic final int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic final char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic final long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic final float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic final double readDouble()
throws IOException
readDouble in interface DataInputIOException@Nonnull public String readUTF() throws IOException
readUTF in interface DataInputIOExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.