-
- All Implemented Interfaces:
public abstract class ScaleCodecAdapter<T extends Object>Provides a default interface for adapters
-
-
Constructor Summary
Constructors Constructor Description ScaleCodecAdapter()
-
Method Summary
Modifier and Type Method Description final Tread(ByteArray byteArray, KType type, List<Annotation> annotations)Reads (decodes) data to specified type from a ByteArray abstract Tread(ByteArrayReader reader, KType type, List<Annotation> annotations)Reads (decodes) data to specified type abstract ByteArraywrite(T obj, KType type, List<Annotation> annotations)Writes (encodes) the object -
-
Method Detail
-
read
final T read(ByteArray byteArray, KType type, List<Annotation> annotations)
Reads (decodes) data to specified type from a ByteArray
- Parameters:
byteArray- ByteArray to decode to a typetype- expected typeannotations- a list of annotations.
-
read
abstract T read(ByteArrayReader reader, KType type, List<Annotation> annotations)
Reads (decodes) data to specified type
- Parameters:
reader- a ByteArray reader thattype- expected typeannotations- a list of annotations.
-
-
-
-