K - key typeV - value typepublic class KeyValuesMarshaller<K,V> extends Marshaller<KeyValue<K,? extends Iterable<V>>>
| Constructor and Description |
|---|
KeyValuesMarshaller(Marshaller<K> keyMarshaller,
Marshaller<V> valueMarshaller) |
| Modifier and Type | Method and Description |
|---|---|
KeyValue<K,Iterable<V>> |
fromBytes(ByteBuffer input)
Returns the object whose serialized representation is in
b between
b.position() and b.limit(). |
ByteBuffer |
toBytes(KeyValue<K,? extends Iterable<V>> keyValues)
Returns a new
ByteBuffer b with a serialized representation
of object between b.position() and b.limit(). |
public KeyValuesMarshaller(Marshaller<K> keyMarshaller, Marshaller<V> valueMarshaller)
public ByteBuffer toBytes(KeyValue<K,? extends Iterable<V>> keyValues)
MarshallerByteBuffer b with a serialized representation
of object between b.position() and b.limit().
b.order() is undefined.public KeyValue<K,Iterable<V>> fromBytes(ByteBuffer input)
Marshallerb between
b.position() and b.limit(). The value of b.order()
when the method is called is undefined, and this method may modify it as
well as b.position() and b.limit().
The method may throw a RuntimeException if it determines that the
sequence of bytes in b was not generated by Marshaller.toBytes(T). This
includes corrupted data as well as trailing bytes.
Copyright © 2015 Google. All rights reserved.