Package com.google.common.hash
Class Funnels
- java.lang.Object
-
- com.google.common.hash.Funnels
-
@Beta @Deprecated(since="2022-12-01") public final class Funnels extends java.lang.Object
Deprecated.The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023Funnels for common types. All implementations are serializable.- Since:
- 11.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.io.OutputStream
asOutputStream(PrimitiveSink sink)
Deprecated.Wraps aPrimitiveSink
as anOutputStream
, so it is easy tofunnel
an object to aPrimitiveSink
if there is already a way to write the contents of the object to anOutputStream
.static Funnel<byte[]>
byteArrayFunnel()
Deprecated.Returns a funnel that extracts the bytes from abyte
array.static Funnel<java.lang.Integer>
integerFunnel()
Deprecated.Returns a funnel for integers.static Funnel<java.lang.Long>
longFunnel()
Deprecated.Returns a funnel for longs.static <E> Funnel<java.lang.Iterable<? extends E>>
sequentialFunnel(Funnel<E> elementFunnel)
Deprecated.Returns a funnel that processes anIterable
by funneling its elements in iteration order with the specified funnel.static Funnel<java.lang.CharSequence>
stringFunnel()
Deprecated.UseunencodedCharsFunnel()
instead.static Funnel<java.lang.CharSequence>
stringFunnel(java.nio.charset.Charset charset)
Deprecated.Returns a funnel that encodes the characters of aCharSequence
with the specifiedCharset
.static Funnel<java.lang.CharSequence>
unencodedCharsFunnel()
Deprecated.Returns a funnel that extracts the characters from aCharSequence
, a character at a time, without performing any encoding.
-
-
-
Method Detail
-
byteArrayFunnel
public static Funnel<byte[]> byteArrayFunnel()
Deprecated.Returns a funnel that extracts the bytes from abyte
array.
-
unencodedCharsFunnel
public static Funnel<java.lang.CharSequence> unencodedCharsFunnel()
Deprecated.Returns a funnel that extracts the characters from aCharSequence
, a character at a time, without performing any encoding. If you need to use a specific encoding, usestringFunnel(Charset)
instead.- Since:
- 15.0 (since 11.0 as
Funnels.stringFunnel()
.
-
stringFunnel
@Deprecated public static Funnel<java.lang.CharSequence> stringFunnel()
Deprecated.UseunencodedCharsFunnel()
instead. This method is scheduled for removal in Guava 16.0.Returns a funnel that extracts the characters from aCharSequence
.
-
stringFunnel
public static Funnel<java.lang.CharSequence> stringFunnel(java.nio.charset.Charset charset)
Deprecated.Returns a funnel that encodes the characters of aCharSequence
with the specifiedCharset
.- Since:
- 15.0
-
integerFunnel
public static Funnel<java.lang.Integer> integerFunnel()
Deprecated.Returns a funnel for integers.- Since:
- 13.0
-
sequentialFunnel
public static <E> Funnel<java.lang.Iterable<? extends E>> sequentialFunnel(Funnel<E> elementFunnel)
Deprecated.Returns a funnel that processes anIterable
by funneling its elements in iteration order with the specified funnel. No separators are added between the elements.- Since:
- 15.0
-
longFunnel
public static Funnel<java.lang.Long> longFunnel()
Deprecated.Returns a funnel for longs.- Since:
- 13.0
-
asOutputStream
public static java.io.OutputStream asOutputStream(PrimitiveSink sink)
Deprecated.Wraps aPrimitiveSink
as anOutputStream
, so it is easy tofunnel
an object to aPrimitiveSink
if there is already a way to write the contents of the object to anOutputStream
.The
close
andflush
methods of the returnedOutputStream
do nothing, and no method throwsIOException
.- Since:
- 13.0
-
-