Returns a new {@code ByteSource} instance representing the specified byte array.
Returns a new {@code ByteSource} instance representing the specified character array's bytes. The byte array is obtained assuming {@code UTF-8} encoding.
Returns a new {@code ByteSource} instance representing the specified string's bytes. The byte array is obtained assuming {@code UTF-8} encoding.
Returns a new {@code ByteSource} instance representing the specified ByteSource.
Returns a {@code ByteSource} instance representing the specified byte source argument. If the argument <em>cannot</em> be easily converted to bytes (as is indicated by the {@link #isCompatible(Object)} JavaDoc), this method will throw an {@link IllegalArgumentException}.
Returns {@code true} if the specified object can be easily represented as a {@code ByteSource} using the {@link ByteSourceUtil}'s default heuristics, {@code false} otherwise. <p/> This implementation merely returns {@link SimpleByteSource}.{@link SimpleByteSource#isCompatible(Object) isCompatible(source)}.
Utility class that can construct ByteSource instances. This is slightly nicer than needing to know the {@code ByteSource} implementation class to use.
@since 1.2