|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.io.RandomAccessFile
ucar.unidata.io.MMapRandomAccessFile
public class MMapRandomAccessFile
Use NIO MappedByteBuffer to implement a RandomAccessFile. Limited to 2G size. Not currently used
| Field Summary |
|---|
| Fields inherited from class ucar.unidata.io.RandomAccessFile |
|---|
BIG_ENDIAN, LITTLE_ENDIAN |
| Constructor Summary | |
|---|---|
MMapRandomAccessFile(java.lang.String location,
java.lang.String mode)
Constructor for in-memory "files" |
|
| Method Summary | |
|---|---|
void |
close()
Close the file, and release any associated system resources. |
void |
flush()
Copy the contents of the buffer to the disk. |
long |
length()
Get the length of the file. |
int |
read()
Read a byte of data from the file, blocking until data is available. |
void |
seek(long pos)
Set the position in the file for the next read or write. |
void |
unread()
Unread the last byte read. |
void |
write(int b)
Write a byte to the file. |
void |
writeBytes(byte[] dst,
int offset,
int length)
Write len bytes from an array to the file. |
| Methods inherited from class ucar.unidata.io.RandomAccessFile |
|---|
getDebugLeaks, getFD, getFilePointer, getLocation, getOpenFiles, getRandomAccessFile, isAtEndOfFile, order, read, read, readBoolean, readByte, readBytes, readChar, readDouble, readDouble, readFloat, readFloat, readFully, readFully, readInt, readInt, readIntUnbuffered, readLine, readLong, readLong, readShort, readShort, readString, readToByteChannel, readUnsignedByte, readUnsignedShort, readUTF, searchForward, setDebugAccess, setDebugLeaks, setExtendMode, setMinLength, skipBytes, toString, write, write, writeBoolean, writeBoolean, writeByte, writeBytes, writeBytes, writeChar, writeChar, writeChars, writeDouble, writeDouble, writeFloat, writeFloat, writeInt, writeInt, writeLong, writeLong, writeShort, writeShort, writeUTF |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MMapRandomAccessFile(java.lang.String location,
java.lang.String mode)
throws java.io.IOException
location - used as a namemode - the open mode
java.io.IOException - on error| Method Detail |
|---|
public void flush()
throws java.io.IOException
RandomAccessFile
flush in class RandomAccessFilejava.io.IOException - if an I/O error occurrs.
public void close()
throws java.io.IOException
RandomAccessFile
close in class RandomAccessFilejava.io.IOException - if an I/O error occurrs.public long length()
RandomAccessFile
length in class RandomAccessFilepublic void seek(long pos)
RandomAccessFile
seek in class RandomAccessFilepos - the offset (in bytes) from the start of the file.public void unread()
RandomAccessFile
unread in class RandomAccessFile
public int read()
throws java.io.IOException
RandomAccessFile
read in class RandomAccessFilejava.io.IOException - if an I/O error occurrs.
public void write(int b)
throws java.io.IOException
RandomAccessFile
write in interface java.io.DataOutputwrite in class RandomAccessFileb - write this byte
java.io.IOException - if an I/O error occurrs.
public void writeBytes(byte[] dst,
int offset,
int length)
throws java.io.IOException
RandomAccessFilelen bytes from an array to the file.
writeBytes in class RandomAccessFiledst - the array containing the data.offset - the offset in the array to the data.length - the length of the data.
java.io.IOException - if an I/O error occurrs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||