private static class DefaultDataBuffer.SlicedDefaultDataBuffer extends DefaultDataBuffer
Constructor and Description |
---|
SlicedDefaultDataBuffer(java.nio.ByteBuffer byteBuffer,
DefaultDataBufferFactory dataBufferFactory,
int length) |
Modifier and Type | Method and Description |
---|---|
DefaultDataBuffer |
capacity(int newCapacity)
Set the number of bytes that this buffer can contain.
|
asByteBuffer, asByteBuffer, asInputStream, asInputStream, asOutputStream, capacity, ensureCapacity, equals, factory, fromEmptyByteBuffer, fromFilledByteBuffer, getByte, getNativeBuffer, hashCode, indexOf, lastIndexOf, read, read, read, readableByteCount, readPosition, readPosition, slice, toString, writableByteCount, write, write, write, write, write, writePosition, writePosition
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
write
SlicedDefaultDataBuffer(java.nio.ByteBuffer byteBuffer, DefaultDataBufferFactory dataBufferFactory, int length)
public DefaultDataBuffer capacity(int newCapacity)
DataBuffer
If the new capacity is lower than the current capacity, the contents of this buffer will be truncated. If the new capacity is higher than the current capacity, it will be expanded.
capacity
in interface DataBuffer
capacity
in class DefaultDataBuffer
newCapacity
- the new capacity