public class MultiMappedFile extends AbstractArrayDataIO implements RandomAccess
| Constructor and Description |
|---|
MultiMappedFile(FileChannel chan,
FileChannel.MapMode mode,
int blockBytes)
Constructs a MultiMappedFile from a channel.
|
MultiMappedFile(File file,
FileChannel.MapMode mode,
int blockBytes)
Constructs a MultiMappedFile from a file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
protected byte |
get()
Reads one byte from the current position.
|
protected void |
get(byte[] buf,
int offset,
int length)
Reads bytes into a buffer from the current position.
|
long |
getFilePointer()
Get the current position in the stream
|
long |
length()
Returns the size of this buffer.
|
void |
mark(int readlimit) |
boolean |
markSupported() |
protected void |
put(byte b)
Writes a single byte at the current position.
|
protected void |
put(byte[] buf,
int offset,
int length)
Writes bytes from a buffer to the current position.
|
protected long |
remaining()
Returns the number of bytes remaining between the current position
and the end of the file.
|
void |
reset() |
void |
seek(long offsetFromStart)
Move to a specified location in the stream.
|
long |
skip(long nskip) |
void |
skipAllBytes(int toSkip) |
void |
skipAllBytes(long nskip) |
int |
skipBytes(int toSkip) |
read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, readArray, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLArray, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, writeArray, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitread, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, readArrayreadBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTFpublic MultiMappedFile(FileChannel chan, FileChannel.MapMode mode, int blockBytes) throws IOException
chan - file channelmode - mapping modeblockBytes - number of bytes per mapped block
(though the final one may have fewer)IOExceptionpublic MultiMappedFile(File file, FileChannel.MapMode mode, int blockBytes) throws IOException
file - filemode - mapping modeblockBytes - number of bytes per mapped block
(though the final one may have fewer)IOExceptionpublic void seek(long offsetFromStart)
throws IOException
RandomAccessseek in interface RandomAccessIOExceptionpublic long skip(long nskip)
throws IOException
skip in interface ArrayDataInputIOExceptionpublic void skipAllBytes(long nskip)
throws IOException
IOExceptionpublic void skipAllBytes(int toSkip)
throws IOException
IOExceptionpublic long getFilePointer()
RandomAccessgetFilePointer in interface RandomAccesspublic int skipBytes(int toSkip)
throws IOException
skipBytes in interface DataInputIOExceptionpublic boolean markSupported()
public void mark(int readlimit)
public void reset()
throws IOException
IOExceptionprotected byte get()
throws IOException
AbstractArrayDataIOget in class AbstractArrayDataIOIOExceptionprotected void get(byte[] buf,
int offset,
int length)
throws IOException
AbstractArrayDataIOget in class AbstractArrayDataIObuf - destination bufferoffset - offset of first byte in buf to be writtenlength - maximum number of bytes to be written to
bufIOExceptionprotected void put(byte b)
throws IOException
AbstractArrayDataIOput in class AbstractArrayDataIOb - output byteIOExceptionprotected void put(byte[] buf,
int offset,
int length)
throws IOException
AbstractArrayDataIOput in class AbstractArrayDataIObuf - source bufferoffset - offset of first byte in buf to be readlength - number of bytes from buf to be readIOExceptionpublic long length()
AbstractArrayDataIOlength in class AbstractArrayDataIOprotected long remaining()
AbstractArrayDataIOLong.MAX_VALUE;remaining in class AbstractArrayDataIOpublic void close()
throws IOException
close in interface ArrayDataInputclose in interface ArrayDataOutputIOExceptionpublic void flush()
flush in interface ArrayDataOutputCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.