Interface ByteSource
- All Known Implementing Classes:
SimpleByteSource
public interface ByteSource
A
ByteSource wraps a byte array and provides additional encoding operations. Most users will find the
ByteSource.Util inner class sufficient to construct ByteSource instances.- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classUtility class that can construct ByteSource instances. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes()Returns the wrapped byte array.booleanisEmpty()Returnstrueif the underlying wrapped byte array is null or empty (zero length),falseotherwise.toBase64()Returns the Base 64-formatted String representation of the underlying wrapped byte array.toHex()Returns the Hex-formatted String representation of the underlying wrapped byte array.
-
Method Details
-
getBytes
-
toHex
-
toBase64
-
isEmpty
boolean isEmpty()Returnstrueif the underlying wrapped byte array is null or empty (zero length),falseotherwise.- Returns:
trueif the underlying wrapped byte array is null or empty (zero length),falseotherwise.- Since:
- 1.2
-