Package org.apache.tika.io
Class MappedBufferCleaner
- java.lang.Object
-
- org.apache.tika.io.MappedBufferCleaner
-
public class MappedBufferCleaner extends Object
Copied/pasted from the Apache Lucene/Solr project.
-
-
Field Summary
Fields Modifier and Type Field Description static StringUNMAP_NOT_SUPPORTED_REASONifUNMAP_SUPPORTEDisfalse, this contains the reason why unmapping is not supported.static booleanUNMAP_SUPPORTEDtrue, if this platform supports unmapping mmapped files.
-
Constructor Summary
Constructors Constructor Description MappedBufferCleaner()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfreeBuffer(ByteBuffer b)If a cleaner is available, this buffer will be cleaned.
-
-
-
Field Detail
-
UNMAP_SUPPORTED
public static final boolean UNMAP_SUPPORTED
true, if this platform supports unmapping mmapped files.
-
UNMAP_NOT_SUPPORTED_REASON
public static final String UNMAP_NOT_SUPPORTED_REASON
ifUNMAP_SUPPORTEDisfalse, this contains the reason why unmapping is not supported.
-
-
Method Detail
-
freeBuffer
public static void freeBuffer(ByteBuffer b) throws IOException
If a cleaner is available, this buffer will be cleaned. Otherwise, this is a no-op.- Parameters:
b- buffer to clean; no-op if buffer is null- Throws:
IOException
-
-