Package org.geotools.io
Class MemoryMappedRandomAccessFile
Object
RandomAccessFile
MemoryMappedRandomAccessFile
- All Implemented Interfaces:
Closeable,DataInput,DataOutput,AutoCloseable,FileCacheable
public class MemoryMappedRandomAccessFile
extends RandomAccessFile
A ReadOnly MemoryMapped RandomAccessFile. It will map the file in memory, using a MappedByteBuffer.
Writing capability is not supported at the moment.
-
Field Summary
Fields inherited from class RandomAccessFile
allFiles, BIG_ENDIAN, bigEndian, buffer, bufferModified, bufferStart, dataEnd, dataSize, debugAccess, debugLeaks, defaultBufferSize, endOfFile, file, fileChannel, filePosition, LITTLE_ENDIAN, location, openFiles, readonly, showOpen, showRead -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static StringgetUriString(String uriString) longlength()voidintread()intreadBytes(byte[] dst, int offset, int length) voidrelease()booleansearchForward(KMPMatch match, int maxBytes) voidseek(long pos) voidsetFileCache(FileCacheIF fileCache) voidwrite(int b) voidwriteBytes(byte[] dst, int offset, int length) Methods inherited from class RandomAccessFile
acquire, acquire, eject, enableDefaultGlobalFileCache, flush, getAllFiles, getBufferSize, getDebugLeaks, getDebugNbytes, getDebugNseeks, getFilePointer, getGlobalFileCache, getLastModified, getLocation, getMaxOpenFileCount, getOpenFileCount, getOpenFiles, getRandomAccessFile, isAtEndOfFile, isDirectory, order, order, read, read, read_, readBoolean, readBuffer, readByte, readBytes, readChar, readDouble, readDouble, readFloat, readFloat, readFully, readFully, readInt, readInt, readIntUnbuffered, readLine, readLine, readLong, readLong, readShort, readShort, readString, readString, readStringMax, readStringMax, readToByteChannel, readUnsignedByte, readUnsignedShort, readUTF, setBufferSize, setDebugAccess, setDebugLeaks, setExtendMode, setGlobalFileCache, setMinLength, shutdown, skipBytes, skipBytes, toString, unread, write, write, writeBoolean, writeBoolean, writeByte, writeBytes, writeBytes, writeChar, writeChar, writeChar, writeChar, writeChar, writeChar, writeChars, writeChars, writeChars, writeDouble, writeDouble, writeDouble, writeDouble, writeDouble, writeDouble, writeFloat, writeFloat, writeFloat, writeFloat, writeFloat, writeFloat, writeInt, writeInt, writeInt, writeInt, writeInt, writeInt, writeLong, writeLong, writeLong, writeLong, writeLong, writeLong, writeShort, writeShort, writeShort, writeShort, writeShort, writeShort, writeUTF
-
Constructor Details
-
MemoryMappedRandomAccessFile
- Throws:
IOException
-
-
Method Details
-
seek
- Overrides:
seekin classRandomAccessFile- Throws:
IOException
-
release
public void release()- Specified by:
releasein interfaceFileCacheable- Overrides:
releasein classRandomAccessFile
-
reacquire
public void reacquire()- Specified by:
reacquirein interfaceFileCacheable- Overrides:
reacquirein classRandomAccessFile
-
setFileCache
public void setFileCache(FileCacheIF fileCache) - Specified by:
setFileCachein interfaceFileCacheable- Overrides:
setFileCachein classRandomAccessFile
-
read
- Overrides:
readin classRandomAccessFile- Throws:
IOException
-
readBytes
- Overrides:
readBytesin classRandomAccessFile- Throws:
IOException
-
write
public void write(int b) - Specified by:
writein interfaceDataOutput- Overrides:
writein classRandomAccessFile
-
writeBytes
public void writeBytes(byte[] dst, int offset, int length) - Overrides:
writeBytesin classRandomAccessFile
-
length
public long length()- Overrides:
lengthin classRandomAccessFile
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceFileCacheable- Overrides:
closein classRandomAccessFile- Throws:
IOException
-
getUriString
-
searchForward
- Overrides:
searchForwardin classRandomAccessFile- Throws:
IOException
-