T
- Type of accepted items.public interface CloseableSink<T> extends Sink<T>, Closeable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close sink, cleanup if required.
|
<U> CloseableSink<U> |
transform(Function<U,T> transformation)
Create a transformation of this sink.
|
void close() throws IllegalStateException
close
in interface AutoCloseable
close
in interface Closeable
IllegalStateException
- when underlying Closeable
fails.<U> CloseableSink<U> transform(Function<U,T> transformation)
U
- Source typetransformation
- Transformation from source type to this sink type