public class ChannelBufferUnsafeDataInputStream extends ChannelBufferUnsafeInputStream implements java.io.DataInput
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| Constructor and Description |
|---|
ChannelBufferUnsafeDataInputStream(java.nio.channels.ReadableByteChannel channel) |
ChannelBufferUnsafeDataInputStream(java.nio.channels.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) |
java.lang.String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
java.lang.String |
readUTF() |
long |
skip(long n) |
int |
skipBytes(int n) |
allocateBuffer, available, close, isOpen, read, read, read, read, readInt, refillBuffer, resetBufferPositionsgetBytesRead, getParkedThread, getParkNanosMax, getUnderlyingChannel, readBuffered, readFrame, readFrameFragment, readIntoBuffer, readIntoBufferNoWait, refillBufferBase, resetAndCopyLeftOverBytes, setParkedThreadpublic ChannelBufferUnsafeDataInputStream(java.nio.channels.ReadableByteChannel channel)
public ChannelBufferUnsafeDataInputStream(java.nio.channels.ReadableByteChannel channel,
int bufferSize)
public final void readFully(@Nonnull
byte[] b)
throws java.io.IOException
readFully in interface java.io.DataInputjava.io.IOExceptionpublic final void readFully(@Nonnull
byte[] b,
int off,
int len)
throws java.io.IOException
readFully in interface java.io.DataInputjava.io.IOExceptionpublic int skipBytes(int n)
skipBytes in interface java.io.DataInputpublic long skip(long n)
skip in class java.io.InputStreampublic final boolean readBoolean()
throws java.io.IOException
readBoolean in interface java.io.DataInputjava.io.IOExceptionpublic final byte readByte()
throws java.io.IOException
readByte in interface java.io.DataInputjava.io.IOExceptionpublic final int readUnsignedByte()
throws java.io.IOException
readUnsignedByte in interface java.io.DataInputjava.io.IOExceptionpublic final short readShort()
throws java.io.IOException
readShort in interface java.io.DataInputjava.io.IOExceptionpublic final int readUnsignedShort()
throws java.io.IOException
readUnsignedShort in interface java.io.DataInputjava.io.IOExceptionpublic final char readChar()
throws java.io.IOException
readChar in interface java.io.DataInputjava.io.IOExceptionpublic final long readLong()
throws java.io.IOException
readLong in interface java.io.DataInputjava.io.IOExceptionpublic final float readFloat()
throws java.io.IOException
readFloat in interface java.io.DataInputjava.io.IOExceptionpublic final double readDouble()
throws java.io.IOException
readDouble in interface java.io.DataInputjava.io.IOExceptionpublic java.lang.String readLine()
readLine in interface java.io.DataInput@Nonnull
public java.lang.String readUTF()
throws java.io.IOException
readUTF in interface java.io.DataInputjava.io.IOExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.