public interface Codec
| Modifier and Type | Method | Description |
|---|---|---|
default <T> T |
clone(T t,
XSupplier<Store> storeSupplier) |
Returns a deep clone of the given object by encoding it to a temporary store obtained from the given supplier and
decoding it again.
|
default <T> T |
clone(T t,
Socket<Buffer> bufferSocket) |
Returns a deep clone of the given object by encoding it to a loaned buffer and decoding it again.
|
default ConnectedCodec |
connect(Store store) |
Connects this codec to the given store.
|
Decoder |
decoder(Socket<java.io.InputStream> input) |
Returns a decoder which reads object graphs from the given input stream socket.
|
default Decoder |
decoder(Source source) |
Returns a decoder which reads object graphs from the given store.
|
default Encoder |
encoder(Sink sink) |
Returns an encoder which writes object graphs to the given store.
|
Encoder |
encoder(Socket<java.io.OutputStream> output) |
Returns an encoder which writes object graphs to the given output stream socket.
|
default Codec |
map(Transformation t) |
Returns a codec which applies the given transformation to the I/O streams loaned to this codec.
|
Encoder encoder(Socket<java.io.OutputStream> output)
default Encoder encoder(Sink sink)
Decoder decoder(Socket<java.io.InputStream> input)
default Decoder decoder(Source source)
default <T> T clone(T t,
XSupplier<Store> storeSupplier)
throws java.lang.Exception
java.lang.Exceptiondefault <T> T clone(T t,
Socket<Buffer> bufferSocket)
throws java.lang.Exception
java.lang.Exceptiondefault ConnectedCodec connect(Store store)
default Codec map(Transformation t)
t - the transformation to apply to the I/O streams loaned to this codec.