Example usage for Java com.google.common.io ByteSource fields, constructors, methods, implement or subclass
The text is from its open source code.
ByteSource() Constructor for use by subclasses. |
CharSource | asCharSource(Charset charset) Returns a CharSource view of this byte source that decodes bytes read from this source as characters using the given Charset . |
ByteSource | concat(Iterable extends ByteSource> sources) Concatenates multiple ByteSource instances into a single source. |
ByteSource | concat(Iterator extends ByteSource> sources) Concatenates multiple ByteSource instances into a single source. |
ByteSource | concat(ByteSource... sources) Concatenates multiple ByteSource instances into a single source. |
boolean | contentEquals(ByteSource other) Checks that the contents of this byte source are equal to the contents of the given byte source. |
long | copyTo(OutputStream output) Copies the contents of this byte source to the given OutputStream . |
long | copyTo(ByteSink sink) Copies the contents of this byte source to the given ByteSink . |
ByteSource | empty() Returns an immutable ByteSource that contains no bytes. |
HashCode | hash(HashFunction hashFunction) Hashes the contents of this byte source using the given hash function. |
boolean | isEmpty() Returns whether the source has zero bytes. |
InputStream | openBufferedStream() Opens a new buffered InputStream for reading from this source. |
InputStream | openStream() Opens a new InputStream for reading from this source. |
byte[] | read() Reads the full contents of this byte source as a byte array. |
T | read(ByteProcessor Reads the contents of this byte source using the given processor to process bytes as they are read. |
long | size() Returns the size of this source in bytes, even if doing so requires opening and traversing an entire stream. |
ByteSource | slice(long offset, long length) Returns a view of a slice of this byte source that is at most length bytes long starting at the given offset . |
String | toString() Returns a string representation of the object. |
ByteSource | wrap(byte[] b) Returns a view of the given byte array as a ByteSource . |