Class MappedByteBufferInputStream

java.lang.Object
java.io.InputStream
com.jogamp.common.nio.MappedByteBufferInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class MappedByteBufferInputStream extends InputStream
An InputStream implementation based on an underlying FileChannel's memory mapped ByteBuffer, supporting mark and reset().

Implementation allows full memory mapped ByteBuffer coverage via FileChannel beyond its size limitation of Integer.MAX_VALUE utilizing an array of ByteBuffer slices.

Implementation further allows full random access via position() and position(long) and accessing the memory mapped ByteBuffer slices directly via currentSlice() and nextSlice().

Since:
2.3.0