public abstract static class BufferWrapper.AbstractBufferWrapper<T extends java.nio.Buffer> extends BufferWrapper
BufferWrapper.AbstractBufferWrapper<T extends java.nio.Buffer>, BufferWrapper.ByteBufferWrapper, BufferWrapper.DoubleBufferWrapper, BufferWrapper.EmptyBufferWrapper, BufferWrapper.FloatBufferWrapper, BufferWrapper.IntBufferWrapper, BufferWrapper.ShortBufferWrapper| Modifier and Type | Field and Description |
|---|---|
protected T |
buffer |
EMPTY_BUFFER_WRAPPER| Constructor and Description |
|---|
AbstractBufferWrapper(T buffer) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doGetByte(byte[] array,
int offset,
int length) |
protected abstract void |
doGetDouble(double[] array,
int offset,
int length) |
protected abstract void |
doGetFloat(float[] array,
int offset,
int length) |
protected abstract void |
doGetInt(int[] array,
int offset,
int length) |
protected abstract void |
doGetShort(short[] array,
int offset,
int length) |
protected abstract BufferWrapper |
doGetSubBuffer() |
protected abstract void |
doPutByte(byte[] array,
int offset,
int length) |
protected abstract void |
doPutDouble(double[] array,
int offset,
int length) |
protected abstract void |
doPutFloat(float[] array,
int offset,
int length) |
protected abstract void |
doPutInt(int[] array,
int offset,
int length) |
protected abstract void |
doPutShort(short[] array,
int offset,
int length) |
protected abstract boolean |
doPutSubBuffer(int index,
BufferWrapper buffer,
int offset,
int length) |
java.nio.Buffer |
getBackingBuffer()
Returns the buffer's backing data sture.
|
void |
getByte(int index,
byte[] array,
int offset,
int length)
Returns the sequence of values starting at the specified index and with the specified length, cast to bytes.
|
void |
getDouble(int index,
double[] array,
int offset,
int length)
Returns the sequence of values starting at the specified index and with the specified length, cast to doubles.
|
void |
getFloat(int index,
float[] array,
int offset,
int length)
Returns the sequence of values starting at the specified index and with the specified length, cast to floats.
|
void |
getInt(int index,
int[] array,
int offset,
int length)
Returns the sequence of values starting at the specified index and with the specified length, cast to ints.
|
void |
getShort(int index,
short[] array,
int offset,
int length)
Returns the sequence of values starting at the specified index and with the specified length, cast to shorts.
|
BufferWrapper |
getSubBuffer(int index,
int length)
Returns a new BufferWrapper which is a subsequence of this buffer.
|
int |
length()
Returns the length of the buffer, in units of the underlying data type (e.g.
|
void |
putByte(int index,
byte[] array,
int offset,
int length)
Sets the sequence of values starting at the specified index and with the specified length, as bytes.
|
void |
putDouble(int index,
double[] array,
int offset,
int length)
Sets the sequence of values starting at the specified index and with the specified length, as doubles.
|
void |
putFloat(int index,
float[] array,
int offset,
int length)
Sets the sequence of values starting at the specified index and with the specified length, as floats.
|
void |
putInt(int index,
int[] array,
int offset,
int length)
Sets the sequence of values starting at the specified index and with the specified length, as ints.
|
void |
putShort(int index,
short[] array,
int offset,
int length)
Sets the sequence of values starting at the specified index and with the specified length, as ints.
|
void |
putSubBuffer(int index,
BufferWrapper buffer)
Sets a subsequence of this buffer with the contents of the specified buffer.
|
void |
putSubBuffer(int index,
BufferWrapper buffer,
int offset,
int length)
Sets a subsequence of this buffer with the contents of the specified buffer.
|
copyOf, emptyBufferWrapper, getByte, getDouble, getFloat, getGLDataType, getInt, getShort, getSizeInBytes, putByte, putDouble, putFloat, putInt, putShort, wrap, wrap, wrapprotected T extends java.nio.Buffer buffer
public AbstractBufferWrapper(T buffer)
protected abstract void doGetByte(byte[] array,
int offset,
int length)
protected abstract void doGetDouble(double[] array,
int offset,
int length)
protected abstract void doGetFloat(float[] array,
int offset,
int length)
protected abstract void doGetInt(int[] array,
int offset,
int length)
protected abstract void doGetShort(short[] array,
int offset,
int length)
protected abstract BufferWrapper doGetSubBuffer()
protected abstract void doPutByte(byte[] array,
int offset,
int length)
protected abstract void doPutDouble(double[] array,
int offset,
int length)
protected abstract void doPutFloat(float[] array,
int offset,
int length)
protected abstract void doPutInt(int[] array,
int offset,
int length)
protected abstract void doPutShort(short[] array,
int offset,
int length)
protected abstract boolean doPutSubBuffer(int index,
BufferWrapper buffer,
int offset,
int length)
public java.nio.Buffer getBackingBuffer()
BufferWrapperBuffer.getBackingBuffer in class BufferWrapperpublic void getByte(int index,
byte[] array,
int offset,
int length)
BufferWrappergetByte in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to get.public void getDouble(int index,
double[] array,
int offset,
int length)
BufferWrappergetDouble in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to get.public void getFloat(int index,
float[] array,
int offset,
int length)
BufferWrappergetFloat in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to get.public void getInt(int index,
int[] array,
int offset,
int length)
BufferWrappergetInt in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to get.public void getShort(int index,
short[] array,
int offset,
int length)
BufferWrappergetShort in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to get.public BufferWrapper getSubBuffer(int index, int length)
BufferWrappergetSubBuffer in class BufferWrapperindex - the new buffer's starting index.length - the new buffer's length.public int length()
BufferWrapperlength in class BufferWrapperpublic void putByte(int index,
byte[] array,
int offset,
int length)
BufferWrapperputByte in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to put.public void putDouble(int index,
double[] array,
int offset,
int length)
BufferWrapperputDouble in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to put.public void putFloat(int index,
float[] array,
int offset,
int length)
BufferWrapperputFloat in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to put.public void putInt(int index,
int[] array,
int offset,
int length)
BufferWrapperputInt in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to put.public void putShort(int index,
short[] array,
int offset,
int length)
BufferWrapperputShort in class BufferWrapperindex - the buffer starting index.array - the array.offset - the array starting index.length - the number of values to put.public void putSubBuffer(int index,
BufferWrapper buffer)
BufferWrapperputSubBuffer in class BufferWrapperindex - the starting index to set.buffer - the buffer.public void putSubBuffer(int index,
BufferWrapper buffer,
int offset,
int length)
BufferWrapperputSubBuffer in class BufferWrapperindex - the starting index to set.buffer - the buffer.offset - the starting index to get from the buffer.length - the number of values to get from the buffer.