public final class CloseableSinks extends Object
Modifier and Type | Method and Description |
---|---|
static <S,T> CloseableSink<S> |
transform(CloseableSink<T> target,
Function<S,T> tr)
Create sink accepting transformed representation.
|
static <T> CloseableSink<T> |
wrap(Sink<T> target) |
static <T> CloseableSink<T> |
wrap(Sink<T> target,
Closeable closeable) |
public static <T> CloseableSink<T> wrap(Sink<T> target)
public static <T> CloseableSink<T> wrap(Sink<T> target, Closeable closeable)
public static <S,T> CloseableSink<S> transform(CloseableSink<T> target, Function<S,T> tr)
S
- Type of entities accepted by returned sinkT
- Type expected by target sinktarget
- Target sinktr
- Transformation from S
to T