public interface ByteSourceCreator
| Modifier and Type | Method and Description |
|---|---|
ByteSource |
bytes(Object source)
Returns a
ByteSource instance representing the specified byte source argument. |
boolean |
isCompatible(Object source)
Returns
true if the specified object can be easily represented as a ByteSource using
the DefaultByteSourceCreator's default heuristics, false otherwise. |
boolean isCompatible(Object source)
true if the specified object can be easily represented as a ByteSource using
the DefaultByteSourceCreator's default heuristics, false otherwise.
This implementation returns true for byte[], char[], String, ByteSource, File, and InputStream.source - the object to test to see if it can be easily converted to ByteSource instances using default
heuristics.true if the specified object can be easily represented as a ByteSource using
the DefaultByteSourceCreator's default heuristics, false otherwise.ByteSource bytes(Object source)
ByteSource instance representing the specified byte source argument. If the argument
cannot be easily converted to bytes (as is indicated by the isCompatible(Object) JavaDoc),
this method will throw an IllegalArgumentException.source - the byte-backed instance that should be represented as a ByteSource instance.ByteSource instance representing the specified byte source argument.CodecException - if the argument cannot be easily converted to bytes
(as indicated by the isCompatible(Object) JavaDoc)Copyright © 2014–2018. All rights reserved.