|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
An InputStream implementation based on an underlying ByteBuffer supporting mark.
More...
Public Member Functions | |
| ByteBufferInputStream (final ByteBuffer buf) | |
| Creates a new byte-buffer input stream. More... | |
| final int | available () |
| final boolean | markSupported () |
This implementation supports mark. More... | |
| final synchronized void | mark (final int unused) |
This implementation supports mark. More... | |
| final synchronized void | reset () throws IOException |
This implementation supports mark. More... | |
| final long | skip (final long n) throws IOException |
| final int | read () |
| final int | read (final byte[] b, final int off, final int len) |
| final int | read (final ByteBuffer b, final int len) |
| final ByteBuffer | getBuffer () |
An InputStream implementation based on an underlying ByteBuffer supporting mark.
May be utilized as well with a memory-mapped FileChannel using a size ≤ Integer#MAX_VALUE.
This becomes efficient with files ≥ 10 MiB, depending on the platform and whether the traditional method uses a BufferedInputStream supporting mark incl. it's buffer size.
See test case com.jogamp.common.nio.TestByteBufferInputStream.
Definition at line 50 of file ByteBufferInputStream.java.
| com.jogamp.common.nio.ByteBufferInputStream.ByteBufferInputStream | ( | final ByteBuffer | buf | ) |
Creates a new byte-buffer input stream.
| buf | the underlying byte buffer. |
Definition at line 59 of file ByteBufferInputStream.java.
| final int com.jogamp.common.nio.ByteBufferInputStream.available | ( | ) |
Definition at line 65 of file ByteBufferInputStream.java.
| final ByteBuffer com.jogamp.common.nio.ByteBufferInputStream.getBuffer | ( | ) |
Definition at line 185 of file ByteBufferInputStream.java.
| final synchronized void com.jogamp.common.nio.ByteBufferInputStream.mark | ( | final int | unused | ) |
This implementation supports mark.
Definition at line 88 of file ByteBufferInputStream.java.
| final boolean com.jogamp.common.nio.ByteBufferInputStream.markSupported | ( | ) |
This implementation supports mark.
Definition at line 76 of file ByteBufferInputStream.java.
| final int com.jogamp.common.nio.ByteBufferInputStream.read | ( | ) |
Definition at line 118 of file ByteBufferInputStream.java.
| final int com.jogamp.common.nio.ByteBufferInputStream.read | ( | final byte[] | b, |
| final int | off, | ||
| final int | len | ||
| ) |
Definition at line 126 of file ByteBufferInputStream.java.
| final int com.jogamp.common.nio.ByteBufferInputStream.read | ( | final ByteBuffer | b, |
| final int | len | ||
| ) |
Definition at line 154 of file ByteBufferInputStream.java.
| final synchronized void com.jogamp.common.nio.ByteBufferInputStream.reset | ( | ) | throws IOException |
This implementation supports mark.
Definition at line 100 of file ByteBufferInputStream.java.
| final long com.jogamp.common.nio.ByteBufferInputStream.skip | ( | final long | n | ) | throws IOException |
Definition at line 108 of file ByteBufferInputStream.java.