|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
An OutputStream implementation based on an underlying FileChannel's memory mapped ByteBuffer.
More...
Public Member Functions | |
| MappedByteBufferOutputStream (final FileChannel fileChannel, final FileChannel.MapMode mmode, final CacheMode cmode, final int sliceShift, final FileResizeOp fileResizeOp) throws IOException | |
Creates a new instance using the given FileChannel. More... | |
| final synchronized void | setSynchronous (final boolean s) |
See MappedByteBufferInputStream#setSynchronous(boolean). More... | |
| final synchronized boolean | getSynchronous () |
See MappedByteBufferInputStream#getSynchronous(). More... | |
| final synchronized void | setLength (final long newTotalSize) throws IOException |
See MappedByteBufferInputStream#setLength(long). More... | |
| final synchronized void | notifyLengthChange (final long newTotalSize) throws IOException |
See MappedByteBufferInputStream#notifyLengthChange(long). More... | |
| final synchronized long | length () |
See MappedByteBufferInputStream#length(). More... | |
| final synchronized long | remaining () throws IOException |
See MappedByteBufferInputStream#remaining(). More... | |
| final synchronized long | position () throws IOException |
See MappedByteBufferInputStream#position(). More... | |
| final synchronized MappedByteBufferInputStream | position (final long newPosition) throws IOException |
See MappedByteBufferInputStream#position(long). More... | |
| final synchronized long | skip (final long n) throws IOException |
See MappedByteBufferInputStream#skip(long). More... | |
| final synchronized void | flush () throws IOException |
| final synchronized void | flush (final boolean metaData) throws IOException |
See MappedByteBufferInputStream#flush(boolean). More... | |
| final synchronized void | close () throws IOException |
| final synchronized void | write (final int b) throws IOException |
| final synchronized void | write (final byte b[], final int off, final int len) throws IOException |
| final synchronized void | write (final ByteBuffer b, final int len) throws IOException |
Perform similar to write(byte[], int, int) with ByteBuffer instead of byte array. More... | |
| final synchronized void | write (final MappedByteBufferInputStream b, final long len) throws IOException |
Perform similar to write(ByteBuffer, int) with MappedByteBufferInputStream instead of byte array. More... | |
An OutputStream implementation based on an underlying FileChannel's memory mapped ByteBuffer.
Implementation is based on MappedByteBufferInputStream, using it as its parent instance.
An instance maybe created via its parent MappedByteBufferInputStream#getOutputStream(FileResizeOp) or directly MappedByteBufferOutputStream(FileChannel, MapMode, CacheMode, int, FileResizeOp).
Definition at line 50 of file MappedByteBufferOutputStream.java.
| com.jogamp.common.nio.MappedByteBufferOutputStream.MappedByteBufferOutputStream | ( | final FileChannel | fileChannel, |
| final FileChannel.MapMode | mmode, | ||
| final CacheMode | cmode, | ||
| final int | sliceShift, | ||
| final FileResizeOp | fileResizeOp | ||
| ) | throws IOException |
Creates a new instance using the given FileChannel.
The ByteBuffer slices will be mapped lazily at first usage.
| fileChannel | the file channel to be mapped lazily. |
| mmode | the map mode, default is FileChannel.MapMode#READ_WRITE. |
| cmode | the caching mode, default is MappedByteBufferInputStream.CacheMode#FLUSH_PRE_SOFT. |
| sliceShift | the pow2 slice size, default is MappedByteBufferInputStream#DEFAULT_SLICE_SHIFT. |
| fileResizeOp | MappedByteBufferInputStream.FileResizeOp as described on MappedByteBufferInputStream#setFileResizeOp(FileResizeOp). |
| IOException |
Definition at line 74 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.close | ( | ) | throws IOException |
Definition at line 157 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.flush | ( | ) | throws IOException |
Definition at line 144 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.flush | ( | final boolean | metaData | ) | throws IOException |
See MappedByteBufferInputStream#flush(boolean).
Definition at line 152 of file MappedByteBufferOutputStream.java.
| final synchronized boolean com.jogamp.common.nio.MappedByteBufferOutputStream.getSynchronous | ( | ) |
See MappedByteBufferInputStream#getSynchronous().
Definition at line 90 of file MappedByteBufferOutputStream.java.
| final synchronized long com.jogamp.common.nio.MappedByteBufferOutputStream.length | ( | ) |
See MappedByteBufferInputStream#length().
Definition at line 111 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.notifyLengthChange | ( | final long | newTotalSize | ) | throws IOException |
See MappedByteBufferInputStream#notifyLengthChange(long).
Definition at line 104 of file MappedByteBufferOutputStream.java.
| final synchronized long com.jogamp.common.nio.MappedByteBufferOutputStream.position | ( | ) | throws IOException |
See MappedByteBufferInputStream#position().
Definition at line 125 of file MappedByteBufferOutputStream.java.
| final synchronized MappedByteBufferInputStream com.jogamp.common.nio.MappedByteBufferOutputStream.position | ( | final long | newPosition | ) | throws IOException |
See MappedByteBufferInputStream#position(long).
Definition at line 132 of file MappedByteBufferOutputStream.java.
| final synchronized long com.jogamp.common.nio.MappedByteBufferOutputStream.remaining | ( | ) | throws IOException |
See MappedByteBufferInputStream#remaining().
Definition at line 118 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.setLength | ( | final long | newTotalSize | ) | throws IOException |
See MappedByteBufferInputStream#setLength(long).
Definition at line 97 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.setSynchronous | ( | final boolean | s | ) |
See MappedByteBufferInputStream#setSynchronous(boolean).
Definition at line 84 of file MappedByteBufferOutputStream.java.
| final synchronized long com.jogamp.common.nio.MappedByteBufferOutputStream.skip | ( | final long | n | ) | throws IOException |
See MappedByteBufferInputStream#skip(long).
Definition at line 139 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.write | ( | final byte | b[], |
| final int | off, | ||
| final int | len | ||
| ) | throws IOException |
Definition at line 188 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.write | ( | final ByteBuffer | b, |
| final int | len | ||
| ) | throws IOException |
Perform similar to write(byte[], int, int) with ByteBuffer instead of byte array.
| b | the ByteBuffer source, data is read from current ByteBuffer#position() |
| len | the number of bytes to write |
| IOException | if a buffer slice operation failed or stream has been closed. |
Definition at line 241 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.write | ( | final int | b | ) | throws IOException |
Definition at line 162 of file MappedByteBufferOutputStream.java.
| final synchronized void com.jogamp.common.nio.MappedByteBufferOutputStream.write | ( | final MappedByteBufferInputStream | b, |
| final long | len | ||
| ) | throws IOException |
Perform similar to write(ByteBuffer, int) with MappedByteBufferInputStream instead of byte array.
Method directly copies memory mapped ByteBuffer'ed data from the given input stream to this stream without extra data copy.
| b | the ByteBuffer source, data is read from current MappedByteBufferInputStream#position() |
| len | the number of bytes to write |
| IOException | if a buffer slice operation failed or stream has been closed. |
Definition at line 310 of file MappedByteBufferOutputStream.java.