public interface SinkWriter<T,S>
V
to a data sink S
.
For example, S
could be an output stream and the value V
could be serialised into the stream. Or V
could be the body of a
message to put on a queue S
.SourceReader
Modifier and Type | Method and Description |
---|---|
default void |
uncheckedWrite(S sink,
T value)
Calls the
write(Object, Object) write} method converting any
checked exception into an unchecked one that will bubble up without
requiring a throws clause on this method. |
void |
write(S sink,
T value)
Writes a value to a data sink.
|
void write(S sink, T value) throws java.lang.Exception
sink
- where to write the value to.value
- the data to write.java.lang.NullPointerException
- if any of the arguments is null
.java.lang.Exception
- if the data could not be written to the sink.default void uncheckedWrite(S sink, T value)
write(Object, Object)
write} method converting any
checked exception into an unchecked one that will bubble up without
requiring a throws
clause on this method.sink
- where to write the value to.value
- the data to write.