ByteSource

A {@code ByteSource} wraps a byte array and provides additional encoding operations. Most users will find the {@link Util} inner class sufficient to construct ByteSource instances.

@since 1.0

Members

Functions

getBytes
byte[] getBytes()

Returns the wrapped byte array.

isEmpty
bool isEmpty()

Returns {@code true} if the underlying wrapped byte array is null or empty (zero length), {@code false} otherwise.

toBase64
string toBase64()

Returns the <a href="http://en.wikipedia.org/wiki/Base64">Base 64</a>-formatted string representation of the underlying wrapped byte array.

toHex
string toHex()

Returns the <a href="http://en.wikipedia.org/wiki/Hexadecimal">Hex</a>-formatted string representation of the underlying wrapped byte array.

Meta