public class DataReader extends Object implements Closeable
| Constructor and Description |
|---|
DataReader(SeekableByteChannel channel,
ByteOrder order,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static DataReader |
createDataReader(SeekableByteChannel channel,
ByteOrder order) |
long |
position() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
int |
readFully(byte[] b) |
int |
readFully3(byte[] b,
int off,
int len) |
int |
readInt() |
long |
readLong() |
short |
readShort() |
long |
setPosition(long newPos) |
long |
size() |
int |
skipBytes(int n) |
public DataReader(SeekableByteChannel channel, ByteOrder order, int bufferSize)
public static DataReader createDataReader(SeekableByteChannel channel, ByteOrder order)
public int readFully3(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic int skipBytes(int n)
throws IOException
IOExceptionpublic byte readByte()
throws IOException
IOExceptionpublic short readShort()
throws IOException
IOExceptionpublic char readChar()
throws IOException
IOExceptionpublic int readInt()
throws IOException
IOExceptionpublic long readLong()
throws IOException
IOExceptionpublic float readFloat()
throws IOException
IOExceptionpublic double readDouble()
throws IOException
IOExceptionpublic long position()
throws IOException
IOExceptionpublic long setPosition(long newPos)
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic long size()
throws IOException
IOExceptionpublic int readFully(byte[] b)
throws IOException
IOExceptionCopyright © 2019. All rights reserved.