Package | Description |
---|---|
com.google.common.io |
This package contains utility methods and classes for working with Java I/O; for example input
streams, output streams, readers, writers, and files.
|
com.google.common.reflect |
This package contains utilities to work with Java reflection.
|
Modifier and Type | Class and Description |
---|---|
private static class |
ByteSource.ByteArrayByteSource |
private static class |
ByteSource.ConcatenatedByteSource |
private static class |
ByteSource.EmptyByteSource |
private class |
ByteSource.SlicedByteSource
A view of a subsection of the containing byte source.
|
private class |
CharSource.AsByteSource
A byte source that reads chars from this source and encodes them as bytes using a charset.
|
private static class |
Files.FileByteSource |
private static class |
MoreFiles.PathByteSource |
private static class |
Resources.UrlByteSource
A byte source that reads from a URL using
URL.openStream() . |
Modifier and Type | Field and Description |
---|---|
private ByteSource |
FileBackedOutputStream.source |
Modifier and Type | Field and Description |
---|---|
private java.util.Iterator<? extends ByteSource> |
MultiInputStream.it |
(package private) java.lang.Iterable<? extends ByteSource> |
ByteSource.ConcatenatedByteSource.sources |
Modifier and Type | Method and Description |
---|---|
ByteSource |
FileBackedOutputStream.asByteSource()
Returns a readable
ByteSource view of the data that has been written to this stream. |
ByteSource |
CharSource.asByteSource(java.nio.charset.Charset charset)
Returns a
ByteSource view of this char source that encodes chars read from this source
as bytes using the given Charset . |
ByteSource |
ByteSource.AsCharSource.asByteSource(java.nio.charset.Charset charset) |
static ByteSource |
Files.asByteSource(java.io.File file)
Returns a new
ByteSource for reading bytes from the given file. |
static ByteSource |
MoreFiles.asByteSource(java.nio.file.Path path,
java.nio.file.OpenOption... options)
Returns a view of the given
path as a ByteSource . |
static ByteSource |
Resources.asByteSource(java.net.URL url)
Returns a
ByteSource that reads from the given URL. |
static ByteSource |
ByteSource.concat(ByteSource... sources)
Concatenates multiple
ByteSource instances into a single source. |
static ByteSource |
ByteSource.concat(java.lang.Iterable<? extends ByteSource> sources)
Concatenates multiple
ByteSource instances into a single source. |
static ByteSource |
ByteSource.concat(java.util.Iterator<? extends ByteSource> sources)
Concatenates multiple
ByteSource instances into a single source. |
ByteSource |
BaseEncoding.decodingSource(CharSource encodedSource)
Returns a
ByteSource that reads base-encoded bytes from the specified CharSource . |
static ByteSource |
ByteSource.empty()
Returns an immutable
ByteSource that contains no bytes. |
ByteSource |
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 . |
ByteSource |
ByteSource.SlicedByteSource.slice(long offset,
long length) |
ByteSource |
ByteSource.ByteArrayByteSource.slice(long offset,
long length) |
static ByteSource |
ByteSource.wrap(byte[] b)
Returns a view of the given byte array as a
ByteSource . |
Modifier and Type | Method and Description |
---|---|
static ByteSource |
ByteSource.concat(ByteSource... sources)
Concatenates multiple
ByteSource instances into a single source. |
boolean |
ByteSource.contentEquals(ByteSource other)
Checks that the contents of this byte source are equal to the contents of the given byte
source.
|
Modifier and Type | Method and Description |
---|---|
static ByteSource |
ByteSource.concat(java.lang.Iterable<? extends ByteSource> sources)
Concatenates multiple
ByteSource instances into a single source. |
static ByteSource |
ByteSource.concat(java.util.Iterator<? extends ByteSource> sources)
Concatenates multiple
ByteSource instances into a single source. |
Constructor and Description |
---|
ConcatenatedByteSource(java.lang.Iterable<? extends ByteSource> sources) |
MultiInputStream(java.util.Iterator<? extends ByteSource> it)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
ByteSource |
ClassPath.ResourceInfo.asByteSource()
Returns a
ByteSource view of the resource from which its bytes can be read. |