@ParametersAreNonnullByDefault
See: Description
Interface | Description |
---|---|
ByteArrayDataInput |
An extension of
DataInput for reading from in-memory byte arrays; its methods offer
identical functionality but do not throw IOException . |
ByteArrayDataOutput |
An extension of
DataOutput for writing to in-memory byte arrays; its methods offer
identical functionality but do not throw IOException . |
ByteProcessor<T> |
A callback interface to process bytes from a stream.
|
Closer.Suppressor |
Suppression strategy interface.
|
LineProcessor<T> |
A callback to be used with the streaming
readLines methods. |
Class | Description |
---|---|
AppendableWriter |
Writer that places all output on an
Appendable target. |
BaseEncoding |
A binary encoding scheme for reversibly translating between byte sequences and printable ASCII
strings.
|
BaseEncoding.Alphabet | |
BaseEncoding.Base16Encoding | |
BaseEncoding.Base64Encoding | |
BaseEncoding.SeparatedBaseEncoding | |
BaseEncoding.StandardBaseEncoding | |
ByteSink |
A destination to which bytes can be written, such as a file.
|
ByteSource |
A readable source of bytes, such as a file.
|
ByteSource.ByteArrayByteSource | |
ByteSource.ConcatenatedByteSource | |
ByteSource.EmptyByteSource | |
ByteStreams |
Provides utility methods for working with byte arrays and I/O streams.
|
ByteStreams.ByteArrayDataInputStream | |
ByteStreams.ByteArrayDataOutputStream | |
ByteStreams.LimitedInputStream | |
CharSequenceReader |
A
Reader that reads the characters in a CharSequence . |
CharSink |
A destination to which characters can be written, such as a text file.
|
CharSource |
A readable source of characters, such as a text file.
|
CharSource.CharSequenceCharSource | |
CharSource.ConcatenatedCharSource | |
CharSource.EmptyCharSource | |
CharSource.StringCharSource |
Subclass specialized for string instances.
|
CharStreams |
Provides utility methods for working with character streams.
|
CharStreams.NullWriter | |
Closeables |
Utility methods for working with
Closeable objects. |
Closer | |
Closer.LoggingSuppressor |
Suppresses exceptions by logging them.
|
Closer.SuppressingSuppressor |
Suppresses exceptions by adding them to the exception that will be thrown using JDK7's
addSuppressed(Throwable) mechanism.
|
CountingInputStream |
An
InputStream that counts the number of bytes read. |
CountingOutputStream |
An OutputStream that counts the number of bytes written.
|
FileBackedOutputStream |
An
OutputStream that starts buffering to a byte array, but switches to file buffering
once the data reaches a configurable size. |
FileBackedOutputStream.MemoryOutput |
ByteArrayOutputStream that exposes its internals.
|
Files |
Provides utility methods for working with files.
|
Files.FileByteSink | |
Files.FileByteSource | |
Flushables |
Utility methods for working with
Flushable objects. |
Java8Compatibility |
Wrappers around
Buffer methods that are covariantly overridden in Java 9+. |
LineBuffer |
Package-protected abstract class that implements the line reading algorithm used by
LineReader . |
LineReader |
A class for reading lines of text.
|
LittleEndianDataInputStream |
An implementation of
DataInput that uses little-endian byte ordering for reading short , int , float , double , and long values. |
LittleEndianDataOutputStream |
An implementation of
DataOutput that uses little-endian byte ordering for writing char , short , int , float , double , and long values. |
MoreFiles |
Static utilities for use with
Path instances, intended to complement Files . |
MoreFiles.PathByteSink | |
MoreFiles.PathByteSource | |
MultiInputStream |
An
InputStream that concatenates multiple substreams. |
MultiReader |
A
Reader that concatenates multiple readers. |
PatternFilenameFilter |
File name filter that only accepts files matching a regular expression.
|
ReaderInputStream |
An
InputStream that converts characters from a Reader into bytes using an
arbitrary Charset. |
Resources |
Provides utility methods for working with resources in the classpath.
|
Resources.UrlByteSource |
A byte source that reads from a URL using
URL.openStream() . |
Enum | Description |
---|---|
Files.FilePredicate | |
FileWriteMode |
Modes for opening a file for writing.
|
RecursiveDeleteOption |
Options for use with recursive delete methods (
MoreFiles.deleteRecursively(java.nio.file.Path, com.google.common.io.RecursiveDeleteOption...) and MoreFiles.deleteDirectoryContents(java.nio.file.Path, com.google.common.io.RecursiveDeleteOption...) ). |
Exception | Description |
---|---|
BaseEncoding.DecodingException |
Exception indicating invalid base-encoded input encountered while decoding.
|
InsecureRecursiveDeleteException |
Exception indicating that a recursive delete can't be performed because the file system does not
have the support necessary to guarantee that it is not vulnerable to race conditions that would
allow it to delete files and directories outside of the directory being deleted (i.e.,
SecureDirectoryStream is not supported). |
At the core of this package are the Source/Sink types: ByteSource
, CharSource
, ByteSink
and CharSink
. They
are factories for I/O streams that provide many convenience methods that handle both opening and
closing streams for you.
This package is a part of the open-source Guava library. For more information on Sources and Sinks as well as other features of this package, see I/O Explained on the Guava wiki.