Package com.intellij.util.io
Class MappedBufferWrapper
- java.lang.Object
-
- com.intellij.util.io.MappedBufferWrapper
-
- Direct Known Subclasses:
ReadOnlyMappedBufferWrapper,ReadWriteMappedBufferWrapper
public abstract class MappedBufferWrapper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected FilemyFileprotected longmyLengthprotected longmyPosition
-
Constructor Summary
Constructors Constructor Description MappedBufferWrapper(File file, long pos, long length)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ByteBufferbuf()static booleanclean(ByteBuffer buffer)voiddispose()voidflush()ByteBuffergetIfCached()booleanisMapped()protected abstract MappedByteBuffermap()static booleantryForce(ByteBuffer buffer)voidunmap()
-
-
-
Field Detail
-
myFile
protected final File myFile
-
myPosition
protected final long myPosition
-
myLength
protected final long myLength
-
-
Constructor Detail
-
MappedBufferWrapper
public MappedBufferWrapper(File file, long pos, long length)
-
-
Method Detail
-
map
protected abstract MappedByteBuffer map()
-
unmap
public final void unmap()
-
getIfCached
public ByteBuffer getIfCached()
-
buf
public ByteBuffer buf()
-
clean
public static boolean clean(ByteBuffer buffer)
-
tryForce
public static boolean tryForce(ByteBuffer buffer)
-
isMapped
public boolean isMapped()
-
flush
public void flush()
-
dispose
public void dispose()
-
-