| Modifier and Type | Method and Description |
|---|---|
static OutputStream |
asOutputStream(PrimitiveSink
Wraps a
PrimitiveSink as an
OutputStream, so it is easy to
funnel an object to a
PrimitiveSink if there is already a way to write the contents of the object to an
OutputStream.
|
static Funnel |
byteArrayFunnel()
Returns a funnel that extracts the bytes from a
byte array.
|
static Funnel |
integerFunnel()
Returns a funnel for integers.
|
static Funnel |
longFunnel()
Returns a funnel for longs.
|
static <E> Funnel |
sequentialFunnel(Funnel
Returns a funnel that processes an
Iterable by funneling its elements in iteration order with the specified funnel.
|
static Funnel |
stringFunnel(Charset
Returns a funnel that encodes the characters of a
CharSequence with the specified
Charset.
|
static Funnel |
unencodedCharsFunnel()
Returns a funnel that extracts the characters from a
CharSequence, a character at a time, without performing any encoding.
|
public static Funnel<byte[]> byteArrayFunnel()
byte array.
public static Funnel<CharSequence > unencodedCharsFunnel()
CharSequence, a character at a time, without performing any encoding. If you need to use a specific encoding, use
stringFunnel(Charset) instead.
Funnels.stringFunnel().
public static Funnel<CharSequence > stringFunnel(Charset charset)
CharSequence with the specified
Charset.
public static Funnel<Integer > integerFunnel()
public static <E> Funnel<Iterable <? extends E>> sequentialFunnel(Funnel <E> elementFunnel)
Iterable by funneling its elements in iteration order with the specified funnel. No separators are added between the elements.
public static OutputStreamasOutputStream(PrimitiveSink sink)
PrimitiveSink as an
OutputStream, so it is easy to
funnel an object to a
PrimitiveSink if there is already a way to write the contents of the object to an
OutputStream.
The close and flush methods of the returned OutputStream do nothing, and no method throws IOException.