|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.common.hash.Funnels
@Beta public final class Funnels
Funnels for common types. All implementations are serializable.
Method Summary | |
---|---|
static OutputStream |
asOutputStream(PrimitiveSink sink)
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<byte[]> |
byteArrayFunnel()
Returns a funnel that extracts the bytes from a byte array. |
static Funnel<Integer> |
integerFunnel()
Returns a funnel for integers. |
static Funnel<Long> |
longFunnel()
Returns a funnel for longs. |
static Funnel<CharSequence> |
stringFunnel()
Returns a funnel that extracts the characters from a CharSequence . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Funnel<byte[]> byteArrayFunnel()
byte
array.
public static Funnel<CharSequence> stringFunnel()
CharSequence
.
public static Funnel<Integer> integerFunnel()
public static Funnel<Long> longFunnel()
public static OutputStream asOutputStream(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
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |