T
- the type of object to serializepublic interface Codec<T>
Modifier and Type | Field and Description |
---|---|
static Codec<javafx.scene.paint.Color> |
COLOR_CODEC |
static Codec<java.lang.String> |
STRING_CODEC |
Modifier and Type | Method and Description |
---|---|
static <T> Codec<java.util.Collection<T>> |
collectionCodec(Codec<T> elemCodec) |
T |
decode(java.io.DataInputStream is) |
static <L,R> Codec<Either<L,R>> |
eitherCodec(Codec<L> lCodec,
Codec<R> rCodec) |
void |
encode(java.io.DataOutputStream os,
T t) |
static <E extends java.lang.Enum<E>> |
enumCodec(java.lang.Class<E> enumType) |
java.lang.String |
getName() |
static <T> Codec<java.util.List<T>> |
listCodec(Codec<T> elemCodec) |
static <T> Codec<java.util.Optional<T>> |
optionalCodec(Codec<T> elemCodec) |
static <SEG,S> Codec<StyledSegment<SEG,S>> |
styledSegmentCodec(Codec<SEG> segCodec,
Codec<S> styleCodec) |
static <S> Codec<StyledSegment<java.lang.String,S>> |
styledTextCodec(Codec<S> styleCodec) |
static final Codec<java.lang.String> STRING_CODEC
static final Codec<javafx.scene.paint.Color> COLOR_CODEC
java.lang.String getName()
void encode(java.io.DataOutputStream os, T t) throws java.io.IOException
java.io.IOException
T decode(java.io.DataInputStream is) throws java.io.IOException
java.io.IOException
static <SEG,S> Codec<StyledSegment<SEG,S>> styledSegmentCodec(Codec<SEG> segCodec, Codec<S> styleCodec)
static <S> Codec<StyledSegment<java.lang.String,S>> styledTextCodec(Codec<S> styleCodec)
static <E extends java.lang.Enum<E>> Codec<E> enumCodec(java.lang.Class<E> enumType)