public class ByteableMarshaller<E extends Byteable> extends Object implements AgileBytesMarshaller<E>
Modifier and Type | Method and Description |
---|---|
long |
hash(E e) |
static <E extends Byteable> |
of(Class<E> eClass) |
static <E extends Byteable> |
of(Class<E> eClass,
ObjectFactory<E> factory) |
E |
read(Bytes bytes,
long size) |
E |
read(Bytes bytes,
long size,
E e) |
long |
readSize(Bytes bytes) |
static void |
setBytesAndOffset(Byteable e,
Bytes bytes) |
long |
size(E e) |
int |
sizeEncodingSize(long size) |
boolean |
startsWith(Bytes bytes,
E e) |
void |
write(Bytes bytes,
E e) |
void |
writeSize(Bytes bytes,
long size) |
public static <E extends Byteable> ByteableMarshaller<E> of(@NotNull Class<E> eClass)
public static <E extends Byteable> ByteableMarshaller<E> of(@NotNull Class<E> eClass, ObjectFactory<E> factory)
public long size(E e)
size
in interface BytesWriter<E extends Byteable>
public int sizeEncodingSize(long size)
sizeEncodingSize
in interface SizeMarshaller
public void writeSize(Bytes bytes, long size)
writeSize
in interface SizeMarshaller
public boolean startsWith(Bytes bytes, E e)
startsWith
in interface BytesInterop<E extends Byteable>
public long hash(E e)
hash
in interface BytesInterop<E extends Byteable>
public void write(Bytes bytes, E e)
write
in interface BytesWriter<E extends Byteable>
public long readSize(Bytes bytes)
readSize
in interface SizeMarshaller
public E read(Bytes bytes, long size)
read
in interface BytesReader<E extends Byteable>
public E read(Bytes bytes, long size, E e)
read
in interface BytesReader<E extends Byteable>
Copyright © 2014. All rights reserved.