public class SimpleMappedInput extends Object implements BasicInput
Note: DO NOT use an instance
of this class from multiple threads - see Unmapper.
| Constructor and Description |
|---|
SimpleMappedInput(BufferManager bufManager)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This does not close the BufManager.
|
long |
getOffset()
Returns the curent position in this stream
(optional operation).
|
boolean |
isRandom()
Indicates whether this object supports random access.
|
byte |
readByte()
Reads a byte from the stream.
|
void |
readBytes(byte[] bbuf)
Reads bytes into an array from the stream.
|
double |
readDouble()
Reads an 8-byte floating point value from the stream.
|
float |
readFloat()
Reads a 4-byte floating point value from the stream.
|
int |
readInt()
Reads a 4-byte integer from the stream.
|
long |
readLong()
Reads an 8-byte integer from the stream.
|
short |
readShort()
Reads a 2-byte integer from the stream.
|
void |
seek(long pos)
Moves the current position of this stream to a given byte offset
(optional operation).
|
void |
skip(long nbyte)
Skips a given number of bytes forwards through the stream.
|
public SimpleMappedInput(BufferManager bufManager) throws IOException
bufManager - buffer manager for the file regionIOExceptionpublic boolean isRandom()
BasicInputisRandom in interface BasicInputpublic void seek(long pos)
throws EOFException
BasicInputseek in interface BasicInputEOFExceptionpublic long getOffset()
BasicInputgetOffset in interface BasicInputpublic void skip(long nbyte)
throws IOException
BasicInputskip in interface BasicInputnbyte - number of bytes to skipIOExceptionpublic byte readByte()
throws EOFException
BasicInputreadByte in interface BasicInputEOFExceptionpublic short readShort()
throws EOFException
BasicInputreadShort in interface BasicInputEOFExceptionpublic int readInt()
throws EOFException
BasicInputreadInt in interface BasicInputEOFExceptionpublic long readLong()
throws EOFException
BasicInputreadLong in interface BasicInputEOFExceptionpublic float readFloat()
throws EOFException
BasicInputreadFloat in interface BasicInputEOFExceptionpublic double readDouble()
throws EOFException
BasicInputreadDouble in interface BasicInputEOFExceptionpublic void readBytes(byte[] bbuf)
throws EOFException
BasicInputreadBytes in interface BasicInputbbuf - array into which the bytes are read;
the number of bytes read is the length of the arrayEOFExceptionpublic void close()
close in interface BasicInputCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.