protected static class BufferWrapper.EmptyBufferWrapper extends BufferWrapper
BufferWrapper.AbstractBufferWrapper<T extends Buffer>, BufferWrapper.ByteBufferWrapper, BufferWrapper.DoubleBufferWrapper, BufferWrapper.EmptyBufferWrapper, BufferWrapper.FloatBufferWrapper, BufferWrapper.IntBufferWrapper, BufferWrapper.ShortBufferWrapperEMPTY_BUFFER_WRAPPER| Modifier | Constructor and Description |
|---|---|
protected |
EmptyBufferWrapper() |
| Modifier and Type | Method and Description |
|---|---|
BufferWrapper |
copyOf(int newSize)
Returns a copy of this buffer with the specified new size.
|
Buffer |
getBackingBuffer()
Returns the buffer's backing data sture.
|
byte |
getByte(int index)
Returns the value at the specified index, cast to a byte.
|
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.
|
double |
getDouble(int index)
Returns the value at the specified index, cast to a double.
|
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.
|
float |
getFloat(int index)
Returns the value at the specified index, cast to a float.
|
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.
|
int |
getGLDataType()
Returns the OpenGL data type corresponding to the buffer's underlying data type (e.g.
|
int |
getInt(int index)
Returns the value at the specified index, cast to an int.
|
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.
|
short |
getShort(int index)
Returns the value at the specified index, cast to a short.
|
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.
|
long |
getSizeInBytes()
Returns the size of this buffer, in bytes.
|
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 value)
Sets the value at the specified index as a byte.
|
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 value)
Sets the value at the specified index as a double.
|
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 value)
Sets the value at the specified index as a float.
|
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 value)
Sets the value at the specified index as an int.
|
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 value)
Sets the value at the specified index as a short.
|
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.
|
emptyBufferWrapper, wrap, wrap, wrappublic BufferWrapper copyOf(int newSize)
BufferWrappercopyOf in class BufferWrappernewSize - the new buffer's size.public Buffer getBackingBuffer()
BufferWrapperBuffer.getBackingBuffer in class BufferWrapperpublic byte getByte(int index)
BufferWrappergetByte in class BufferWrapperindex - the index of the value to be returned.public 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 double getDouble(int index)
BufferWrappergetDouble in class BufferWrapperindex - the index of the value to be returned.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 float getFloat(int index)
BufferWrappergetFloat in class BufferWrapperindex - the index of the value to be returned.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 int getGLDataType()
BufferWrappergetGLDataType in class BufferWrapperpublic int getInt(int index)
BufferWrappergetInt in class BufferWrapperindex - the index of the value to be returned.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 short getShort(int index)
BufferWrappergetShort in class BufferWrapperindex - the index of the value to be returned.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 long getSizeInBytes()
BufferWrappergetSizeInBytes in class BufferWrapperpublic 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 value)
BufferWrapperputByte in class BufferWrapperindex - the index of the value to be returned.value - the byte value to be set.public 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 value)
BufferWrapperputDouble in class BufferWrapperindex - the index of the value to be returned.value - the double value to be set.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 value)
BufferWrapperputFloat in class BufferWrapperindex - the index of the value to be returned.value - the float value to be set.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 value)
BufferWrapperputInt in class BufferWrapperindex - the index of the value to be returned.value - the int value to be set.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 value)
BufferWrapperputShort in class BufferWrapperindex - the index of the value to be returned.value - the short value to be set.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.