java.nio.ByteBuffer of one-byte items.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | SimpleNIOBuffer.
A |
| Access | Constructor and Description |
|---|---|
| protected | SimpleNIOBuffer(BufferProtocol
exporting object (or obj, ByteBuffer null)the storage, int ByteBuffer wrapping the exported object state.Note this
offset where the data starts in that array (item[0]) index0, int the number of bytes occupied size)Provide an instance of |
| public | SimpleNIOBuffer(int
consumer requirements flags, BufferProtocol exporting object (or obj, ByteBuffer null)the storage, int ByteBuffer wrapping the exported object stateoffset where the data starts in that buffer (item[0]) index0, int the number of bytes occupied size)Provide an instance of |
| protected | SimpleNIOBuffer(BufferProtocol
exporting object (or obj, ByteBuffer null)the storage)ByteBuffer wrapping the exported object state.Note this
Provide an instance of |
| public | SimpleNIOBuffer(int
consumer requirements flags, BufferProtocol exporting object (or obj, ByteBuffer null)the storage)ByteBuffer wrapping the exported object stateProvide an instance of |
| Modifier and Type | Method and Description |
|---|---|
| public final int | byteIndex(int
item-index from consumer index)Overrides org. Implements org. Convert an item index (for a one-dimensional buffer) to an absolute byte index in the storage shared by the exporter. |
| public PyBuffer | getBufferSlice(int
specifying features demanded and the navigational capabilities of the consumer flags, int index in the current buffer start, int number of items in the required slice count)Overrides org. Implements org. Equivalent to |
| public PyBuffer | getBufferSlice(int
specifying features demanded and the navigational capabilities of the consumer flags, int index in the current buffer start, int number of items in the required slice count, int index-distance in the current buffer between consecutive items in the slice stride)Implements org. Get a |
| public int | getLen()
Overrides org. Implements org. The total number of bytes represented by the view, which will be the product of the elements
of the |
| SimpleNIOBuffer | back to summary |
|---|---|
| protected SimpleNIOBuffer(BufferProtocol obj, ByteBuffer storage, int index0, int size) throws PyException, ArrayIndexOutOfBoundsException Provide an instance of super(storage.duplicate(), index0, size); checkRequestFlags(flags); // Check request is compatible with type
| |
| SimpleNIOBuffer | back to summary |
|---|---|
| public SimpleNIOBuffer(int flags, BufferProtocol obj, ByteBuffer storage, int index0, int size) throws PyException, ArrayIndexOutOfBoundsException, NullPointerException Provide an instance of
| |
| SimpleNIOBuffer | back to summary |
|---|---|
| protected SimpleNIOBuffer(BufferProtocol obj, ByteBuffer storage) throws NullPointerException Provide an instance of
| |
| SimpleNIOBuffer | back to summary |
|---|---|
| public SimpleNIOBuffer(int flags, BufferProtocol obj, ByteBuffer storage) throws PyException, NullPointerException Provide an instance of
| |
| byteIndex | back to summary |
|---|---|
| public final int byteIndex(int index) throws IndexOutOfBoundsException Overrides org. Implements org. Doc from org. Convert an item index (for a one-dimensional buffer) to an absolute byte index in the storage
shared by the exporter. The storage exported as a
| |
| getBufferSlice | back to summary |
|---|---|
| public PyBuffer getBufferSlice(int flags, int start, int count) Overrides org. Implements org. Doc from org. Equivalent to
a buffer representing the slice | |
| getBufferSlice | back to summary |
|---|---|
| public PyBuffer getBufferSlice(int flags, int start, int count, int stride) Implements org. Doc from org. Get a
Suppose that x(i) denotes the ith element of the current buffer, that is, the
byte retrieved by
In a simple buffer backed by a contiguous byte array, the result is a strided PyBuffer on the
same storage but where the offset is adjusted by s and the stride is as supplied. If
the current buffer is already strided and/or has an item size larger than single bytes, the
new
a buffer representing the slice | |
| getLen | back to summary |
|---|---|
| public int getLen() Overrides org. Implements org. Doc from org. The total number of bytes represented by the view, which will be the product of the elements
of the
| |
SimpleNIOBuffer.SimpleView represents a contiguous subsequence of another
SimpleNIOBuffer.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv PyBuffer | root
The buffer on which this is a slice view |
| Access | Constructor and Description |
|---|---|
| public | SimpleView(PyBuffer
buffer which will be acquired and must be released ultimately root, int the request flags of the consumer that requested the slice flags, ByteBuffer ByteBuffer wrapping exported data (no reference kept)where the data starts in that buffer (item[0]) offset, int the number of items in the sliced view count)Construct a slice of a SimpleNIOBuffer. |
| Modifier and Type | Method and Description |
|---|---|
| protected PyBuffer | getRoot()
Overrides org. Some |
| root | back to summary |
|---|---|
| pack-priv PyBuffer root The buffer on which this is a slice view | |
| SimpleView | back to summary |
|---|---|
| public SimpleView(PyBuffer root, int flags, ByteBuffer storage, int offset, int count) Construct a slice of a SimpleNIOBuffer.
| |
| getRoot | back to summary |
|---|---|
| protected PyBuffer getRoot() Overrides org. Doc from org. Some | |