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.
|
Modifier and Type | Method and Description |
---|---|
T |
LineProcessor.getResult()
Return the result of processing all the lines.
|
T |
ByteProcessor.getResult()
Return the result of processing all the bytes.
|
<T> T |
ByteSource.ByteArrayByteSource.read(ByteProcessor<T> processor) |
static <T> T |
Files.readBytes(java.io.File file,
ByteProcessor<T> processor)
Deprecated.
Prefer
asByteSource(file).read(processor) . |
static <T> T |
ByteStreams.readBytes(java.io.InputStream input,
ByteProcessor<T> processor)
Process the bytes of the given input stream using the given processor.
|
static <T> T |
Files.readLines(java.io.File file,
java.nio.charset.Charset charset,
LineProcessor<T> callback)
Deprecated.
Prefer
asCharSource(file, charset).readLines(callback) . |
<T> T |
CharSource.readLines(LineProcessor<T> processor)
Reads lines of text from this source, processing each line as it is read using the given
processor . |
<T> T |
CharSource.CharSequenceCharSource.readLines(LineProcessor<T> processor) |
static <T> T |
CharStreams.readLines(java.lang.Readable readable,
LineProcessor<T> processor)
Streams lines from a
Readable object, stopping when the processor returns false
or all lines have been read and returning the result produced by the processor. |
static <T> T |
Resources.readLines(java.net.URL url,
java.nio.charset.Charset charset,
LineProcessor<T> callback)
Streams lines from a URL, stopping when our callback returns false, or we have read all of the
lines.
|
<C extends java.io.Closeable> |
Closer.register(C closeable)
|
Modifier and Type | Method and Description |
---|---|
<C extends java.io.Closeable> |
Closer.register(C closeable)
|