Class MappedByteBufferHandler
- java.lang.Object
-
- org.apache.druid.java.util.common.MappedByteBufferHandler
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ResourceHolder<MappedByteBuffer>
public final class MappedByteBufferHandler extends Object implements ResourceHolder<MappedByteBuffer>
Facilitates using try-with-resources withMappedByteBuffer.- See Also:
FileUtils.map(java.io.File)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Unmaps the wrapped buffer.MappedByteBufferget()Returns the wrapped buffer.
-
-
-
Method Detail
-
get
public MappedByteBuffer get()
Returns the wrapped buffer.- Specified by:
getin interfaceResourceHolder<MappedByteBuffer>
-
close
public void close()
Unmaps the wrapped buffer.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceResourceHolder<MappedByteBuffer>
-
-