Package org.nustaq.offheap.bytez.malloc
Class MMFBytez
java.lang.Object
org.nustaq.offheap.bytez.malloc.MemoryBytez
org.nustaq.offheap.bytez.malloc.MMFBytez
- All Implemented Interfaces:
BasicBytez,ByteSink,ByteSource,Bytez
public class MMFBytez extends MemoryBytez
Bytez allocated inside a memory mapped file. Some Mmap file stuff handling is copied from OpenHFT library (too big to depend on for fst),
a great tool for all kind of binary/low level java stuff. Check it out at github.
-
Constructor Summary
Constructors Constructor Description MMFBytez(java.lang.String filePath, long length, boolean clearFile) -
Method Summary
Modifier and Type Method Description voidfreeAndClose()java.io.FilegetFile()protected voidinit(java.lang.String file, long length, boolean clearFile)Methods inherited from class org.nustaq.offheap.bytez.malloc.MemoryBytez
asByteArray, compareAndSwapInt, compareAndSwapLong, copyTo, equals, get, getArr, getBALength, getBAOffsetIndex, getBool, getBooleanArr, getChar, getCharArr, getDouble, getDoubleArr, getFloat, getFloatArr, getInt, getIntArr, getLength, getLong, getLongArr, getShort, getShortArr, hashCode, length, main, newInstance, put, putBool, putChar, putDouble, putFloat, putInt, putLong, putShort, set, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setShort, slice, toBytes
-
Constructor Details
-
MMFBytez
public MMFBytez(java.lang.String filePath, long length, boolean clearFile) throws java.lang.Exception- Throws:
java.lang.Exception
-
-
Method Details
-
init
protected void init(java.lang.String file, long length, boolean clearFile) throws java.lang.Exception- Throws:
java.lang.Exception
-
freeAndClose
public void freeAndClose() -
getFile
public java.io.File getFile()
-