public class DecompressingByteBufferObjectStrategy extends Object implements ObjectStrategy<ResourceHolder<ByteBuffer>>
Modifier and Type | Method and Description |
---|---|
int |
compare(ResourceHolder<ByteBuffer> o1,
ResourceHolder<ByteBuffer> o2) |
ResourceHolder<ByteBuffer> |
fromByteBuffer(ByteBuffer buffer,
int numBytes)
Convert values from their underlying byte representation.
|
Class<? extends ResourceHolder<ByteBuffer>> |
getClazz() |
byte[] |
toBytes(ResourceHolder<ByteBuffer> holder) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromByteBufferWithSize, writeTo
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public Class<? extends ResourceHolder<ByteBuffer>> getClazz()
getClazz
in interface ObjectStrategy<ResourceHolder<ByteBuffer>>
public ResourceHolder<ByteBuffer> fromByteBuffer(ByteBuffer buffer, int numBytes)
ObjectStrategy
ByteBuffer.slice()
, ByteBuffer.asReadOnlyBuffer()
or ByteBuffer.duplicate()
in
this case.fromByteBuffer
in interface ObjectStrategy<ResourceHolder<ByteBuffer>>
buffer
- buffer to read value fromnumBytes
- number of bytes used to store the value, starting at buffer.position()public int compare(ResourceHolder<ByteBuffer> o1, ResourceHolder<ByteBuffer> o2)
compare
in interface Comparator<ResourceHolder<ByteBuffer>>
public byte[] toBytes(ResourceHolder<ByteBuffer> holder)
toBytes
in interface ObjectStrategy<ResourceHolder<ByteBuffer>>
Copyright © 2011–2018. All rights reserved.