Index
All Classes and Interfaces|All Packages|Serialized Form
A
- accept(File, String) - Method in class dev.mccue.guava.io.PatternFilenameFilter
- ALLOW_INSECURE - Enum constant in enum dev.mccue.guava.io.RecursiveDeleteOption
-
Specifies that the recursive delete should not throw an exception when it can't be guaranteed that it can be done securely, without vulnerability to race conditions (i.e.
- append(CharSequence, File, Charset) - Static method in class dev.mccue.guava.io.Files
-
Deprecated.
- APPEND - Enum constant in enum dev.mccue.guava.io.FileWriteMode
-
Specifies that writes to the opened file should append to the end of the file.
- asByteSink(File, FileWriteMode...) - Static method in class dev.mccue.guava.io.Files
-
Returns a new
ByteSinkfor writing bytes to the given file. - asByteSink(Path, OpenOption...) - Static method in class dev.mccue.guava.io.MoreFiles
-
Returns a view of the given
pathas aByteSink. - asByteSource() - Method in class dev.mccue.guava.io.FileBackedOutputStream
-
Returns a readable
ByteSourceview of the data that has been written to this stream. - asByteSource(File) - Static method in class dev.mccue.guava.io.Files
-
Returns a new
ByteSourcefor reading bytes from the given file. - asByteSource(URL) - Static method in class dev.mccue.guava.io.Resources
-
Returns a
ByteSourcethat reads from the given URL. - asByteSource(Charset) - Method in class dev.mccue.guava.io.CharSource
-
Returns a
ByteSourceview of this char source that encodes chars read from this source as bytes using the givenCharset. - asByteSource(Path, OpenOption...) - Static method in class dev.mccue.guava.io.MoreFiles
-
Returns a view of the given
pathas aByteSource. - asCharSink(File, Charset, FileWriteMode...) - Static method in class dev.mccue.guava.io.Files
-
Returns a new
CharSinkfor writing character data to the given file using the given character set. - asCharSink(Charset) - Method in class dev.mccue.guava.io.ByteSink
- asCharSink(Path, Charset, OpenOption...) - Static method in class dev.mccue.guava.io.MoreFiles
- asCharSource(File, Charset) - Static method in class dev.mccue.guava.io.Files
-
Returns a new
CharSourcefor reading character data from the given file using the given character set. - asCharSource(URL, Charset) - Static method in class dev.mccue.guava.io.Resources
-
Returns a
CharSourcethat reads from the given URL using the given character set. - asCharSource(Charset) - Method in class dev.mccue.guava.io.ByteSource
-
Returns a
CharSourceview of this byte source that decodes bytes read from this source as characters using the givenCharset. - asCharSource(Path, Charset, OpenOption...) - Static method in class dev.mccue.guava.io.MoreFiles
- asWriter(Appendable) - Static method in class dev.mccue.guava.io.CharStreams
-
Returns a Writer that sends all output to the given
Appendabletarget.
B
- base16() - Static method in class dev.mccue.guava.io.BaseEncoding
-
The "base16" encoding specified by RFC 4648 section 8, Base 16 Encoding.
- base32() - Static method in class dev.mccue.guava.io.BaseEncoding
-
The "base32" encoding specified by RFC 4648 section 6, Base 32 Encoding.
- base32Hex() - Static method in class dev.mccue.guava.io.BaseEncoding
-
The "base32hex" encoding specified by RFC 4648 section 7, Base 32 Encoding with Extended Hex Alphabet.
- base64() - Static method in class dev.mccue.guava.io.BaseEncoding
-
The "base64" base encoding specified by RFC 4648 section 4, Base 64 Encoding.
- base64Url() - Static method in class dev.mccue.guava.io.BaseEncoding
-
The "base64url" encoding specified by RFC 4648 section 5, Base 64 Encoding with URL and Filename Safe Alphabet, also sometimes referred to as the "web safe Base64." (This is the same as the base 64 encoding with URL and filename safe alphabet from RFC 3548.)
- BaseEncoding - Class in dev.mccue.guava.io
-
A binary encoding scheme for reversibly translating between byte sequences and printable ASCII strings.
- BaseEncoding.DecodingException - Exception in dev.mccue.guava.io
-
Exception indicating invalid base-encoded input encountered while decoding.
- ByteArrayDataInput - Interface in dev.mccue.guava.io
-
An extension of
DataInputfor reading from in-memory byte arrays; its methods offer identical functionality but do not throwIOException. - ByteArrayDataOutput - Interface in dev.mccue.guava.io
-
An extension of
DataOutputfor writing to in-memory byte arrays; its methods offer identical functionality but do not throwIOException. - ByteProcessor<T extends @Nullable Object> - Interface in dev.mccue.guava.io
-
A callback interface to process bytes from a stream.
- ByteSink - Class in dev.mccue.guava.io
-
A destination to which bytes can be written, such as a file.
- ByteSink() - Constructor for class dev.mccue.guava.io.ByteSink
-
Constructor for use by subclasses.
- ByteSource - Class in dev.mccue.guava.io
-
A readable source of bytes, such as a file.
- ByteSource() - Constructor for class dev.mccue.guava.io.ByteSource
-
Constructor for use by subclasses.
- ByteStreams - Class in dev.mccue.guava.io
-
Provides utility methods for working with byte arrays and I/O streams.
C
- canDecode(CharSequence) - Method in class dev.mccue.guava.io.BaseEncoding
-
Determines whether the specified character sequence is a valid encoded string according to this encoding.
- CharSink - Class in dev.mccue.guava.io
-
A destination to which characters can be written, such as a text file.
- CharSink() - Constructor for class dev.mccue.guava.io.CharSink
-
Constructor for use by subclasses.
- CharSource - Class in dev.mccue.guava.io
-
A readable source of characters, such as a text file.
- CharSource() - Constructor for class dev.mccue.guava.io.CharSource
-
Constructor for use by subclasses.
- CharStreams - Class in dev.mccue.guava.io
-
Provides utility methods for working with character streams.
- close() - Method in class dev.mccue.guava.io.Closer
-
Closes all
Closeableinstances that have been added to thisCloser. - close() - Method in class dev.mccue.guava.io.CountingOutputStream
- close() - Method in class dev.mccue.guava.io.FileBackedOutputStream
- close() - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
- close(Closeable, boolean) - Static method in class dev.mccue.guava.io.Closeables
-
Closes a
Closeable, with control over whether anIOExceptionmay be thrown. - Closeables - Class in dev.mccue.guava.io
-
Utility methods for working with
Closeableobjects. - closeQuietly(InputStream) - Static method in class dev.mccue.guava.io.Closeables
-
Closes the given
InputStream, logging anyIOExceptionthat's thrown rather than propagating it. - closeQuietly(Reader) - Static method in class dev.mccue.guava.io.Closeables
-
Closes the given
Reader, logging anyIOExceptionthat's thrown rather than propagating it. - Closer - Class in dev.mccue.guava.io
- concat(ByteSource...) - Static method in class dev.mccue.guava.io.ByteSource
-
Concatenates multiple
ByteSourceinstances into a single source. - concat(CharSource...) - Static method in class dev.mccue.guava.io.CharSource
-
Concatenates multiple
CharSourceinstances into a single source. - concat(Iterable<? extends ByteSource>) - Static method in class dev.mccue.guava.io.ByteSource
-
Concatenates multiple
ByteSourceinstances into a single source. - concat(Iterable<? extends CharSource>) - Static method in class dev.mccue.guava.io.CharSource
-
Concatenates multiple
CharSourceinstances into a single source. - concat(Iterator<? extends ByteSource>) - Static method in class dev.mccue.guava.io.ByteSource
-
Concatenates multiple
ByteSourceinstances into a single source. - concat(Iterator<? extends CharSource>) - Static method in class dev.mccue.guava.io.CharSource
-
Concatenates multiple
CharSourceinstances into a single source. - contentEquals(ByteSource) - Method in class dev.mccue.guava.io.ByteSource
-
Checks that the contents of this byte source are equal to the contents of the given byte source.
- copy(File, File) - Static method in class dev.mccue.guava.io.Files
-
Copies all the bytes from one file to another.
- copy(File, OutputStream) - Static method in class dev.mccue.guava.io.Files
-
Copies all bytes from a file to an output stream.
- copy(File, Charset, Appendable) - Static method in class dev.mccue.guava.io.Files
-
Deprecated.Prefer
asCharSource(from, charset).copyTo(to). - copy(InputStream, OutputStream) - Static method in class dev.mccue.guava.io.ByteStreams
-
Copies all bytes from the input stream to the output stream.
- copy(Readable, Appendable) - Static method in class dev.mccue.guava.io.CharStreams
-
Copies all characters between the
ReadableandAppendableobjects. - copy(URL, OutputStream) - Static method in class dev.mccue.guava.io.Resources
-
Copies all bytes from a URL to an output stream.
- copy(ReadableByteChannel, WritableByteChannel) - Static method in class dev.mccue.guava.io.ByteStreams
-
Copies all bytes from the readable channel to the writable channel.
- copyTo(ByteSink) - Method in class dev.mccue.guava.io.ByteSource
-
Copies the contents of this byte source to the given
ByteSink. - copyTo(CharSink) - Method in class dev.mccue.guava.io.CharSource
-
Copies the contents of this source to the given sink.
- copyTo(OutputStream) - Method in class dev.mccue.guava.io.ByteSource
-
Copies the contents of this byte source to the given
OutputStream. - copyTo(Appendable) - Method in class dev.mccue.guava.io.CharSource
-
Appends the contents of this source to the given
Appendable(such as aWriter). - CountingInputStream - Class in dev.mccue.guava.io
-
An
InputStreamthat counts the number of bytes read. - CountingInputStream(InputStream) - Constructor for class dev.mccue.guava.io.CountingInputStream
-
Wraps another input stream, counting the number of bytes read.
- CountingOutputStream - Class in dev.mccue.guava.io
-
An OutputStream that counts the number of bytes written.
- CountingOutputStream(OutputStream) - Constructor for class dev.mccue.guava.io.CountingOutputStream
-
Wraps another output stream, counting the number of bytes written.
- create() - Static method in class dev.mccue.guava.io.Closer
-
Creates a new
Closer. - createParentDirectories(Path, FileAttribute<?>...) - Static method in class dev.mccue.guava.io.MoreFiles
-
Creates any necessary but nonexistent parent directories of the specified path.
- createParentDirs(File) - Static method in class dev.mccue.guava.io.Files
-
Creates any necessary but nonexistent parent directories of the specified file.
- createTempDir() - Static method in class dev.mccue.guava.io.Files
-
Deprecated.For Android users, see the Data and File Storage overview to select an appropriate temporary directory (perhaps
context.getCacheDir()), and create your own directory under that. (For example, you might usenew File(context.getCacheDir(), "directoryname").mkdir(), or, if you need an arbitrary number of temporary directories, you might have to generate multiple directory names in a loop untilmkdir()returnstrue.) For developers on Java 7 or later, useFiles.createTempDirectory(java.nio.file.Path, java.lang.String, java.nio.file.attribute.FileAttribute<?>...), transforming it to aFileusingtoFile()if needed. To restrict permissions as this method does, passPosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rwx------"))to your call tocreateTempDirectory.
D
- decode(CharSequence) - Method in class dev.mccue.guava.io.BaseEncoding
-
Decodes the specified character sequence, and returns the resulting
byte[]. - decodingSource(CharSource) - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns a
ByteSourcethat reads base-encoded bytes from the specifiedCharSource. - decodingStream(Reader) - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns an
InputStreamthat decodes base-encoded input from the specifiedReader. - deleteDirectoryContents(Path, RecursiveDeleteOption...) - Static method in class dev.mccue.guava.io.MoreFiles
-
Deletes all files within the directory at the given
pathrecursively. - deleteRecursively(Path, RecursiveDeleteOption...) - Static method in class dev.mccue.guava.io.MoreFiles
-
Deletes the file or directory at the given
pathrecursively. - dev.mccue.guava.io - module dev.mccue.guava.io
- dev.mccue.guava.io - package dev.mccue.guava.io
-
Utility methods and classes for I/O; for example input streams, output streams, readers, writers, and files.
E
- empty() - Static method in class dev.mccue.guava.io.ByteSource
-
Returns an immutable
ByteSourcethat contains no bytes. - empty() - Static method in class dev.mccue.guava.io.CharSource
-
Returns an immutable
CharSourcethat contains no characters. - encode(byte[]) - Method in class dev.mccue.guava.io.BaseEncoding
-
Encodes the specified byte array, and returns the encoded
String. - encode(byte[], int, int) - Method in class dev.mccue.guava.io.BaseEncoding
-
Encodes the specified range of the specified byte array, and returns the encoded
String. - encodingSink(CharSink) - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns a
ByteSinkthat writes base-encoded bytes to the specifiedCharSink. - encodingStream(Writer) - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns an
OutputStreamthat encodes bytes using this encoding into the specifiedWriter. - equal(File, File) - Static method in class dev.mccue.guava.io.Files
-
Returns true if the given files exist, are not directories, and contain the same bytes.
- equal(Path, Path) - Static method in class dev.mccue.guava.io.MoreFiles
-
Returns true if the files located by the given paths exist, are not directories, and contain the same bytes.
- exhaust(InputStream) - Static method in class dev.mccue.guava.io.ByteStreams
-
Reads and discards data from the given
InputStreamuntil the end of the stream is reached. - exhaust(Readable) - Static method in class dev.mccue.guava.io.CharStreams
-
Reads and discards data from the given
Readableuntil the end of the stream is reached.
F
- FileBackedOutputStream - Class in dev.mccue.guava.io
-
An
OutputStreamthat starts buffering to a byte array, but switches to file buffering once the data reaches a configurable size. - Files - Class in dev.mccue.guava.io
-
Provides utility methods for working with files.
- fileTraverser() - Static method in class dev.mccue.guava.io.Files
-
Returns a
Traverserinstance for the file and directory tree. - fileTraverser() - Static method in class dev.mccue.guava.io.MoreFiles
-
Returns a
Traverserinstance for the file and directory tree. - FileWriteMode - Enum in dev.mccue.guava.io
-
Modes for opening a file for writing.
- flush() - Method in class dev.mccue.guava.io.FileBackedOutputStream
- flush(Flushable, boolean) - Static method in class dev.mccue.guava.io.Flushables
-
Flush a
Flushable, with control over whether anIOExceptionmay be thrown. - Flushables - Class in dev.mccue.guava.io
-
Utility methods for working with
Flushableobjects. - flushQuietly(Flushable) - Static method in class dev.mccue.guava.io.Flushables
-
Equivalent to calling
flush(flushable, true), but with noIOExceptionin the signature. - forEachLine(Consumer<? super String>) - Method in class dev.mccue.guava.io.CharSource
-
Reads all lines of text from this source, running the given
actionfor each line as it is read.
G
- getCount() - Method in class dev.mccue.guava.io.CountingInputStream
-
Returns the number of bytes read.
- getCount() - Method in class dev.mccue.guava.io.CountingOutputStream
-
Returns the number of bytes written.
- getFileExtension(String) - Static method in class dev.mccue.guava.io.Files
-
Returns the file extension for the given file name, or the empty string if the file has no extension.
- getFileExtension(Path) - Static method in class dev.mccue.guava.io.MoreFiles
-
Returns the file extension for the file at the given path, or the empty string if the file has no extension.
- getNameWithoutExtension(String) - Static method in class dev.mccue.guava.io.Files
-
Returns the file name without its file extension or path.
- getNameWithoutExtension(Path) - Static method in class dev.mccue.guava.io.MoreFiles
-
Returns the file name without its file extension or path.
- getResource(Class<?>, String) - Static method in class dev.mccue.guava.io.Resources
-
Given a
resourceNamethat is relative tocontextClass, returns aURLpointing to the named resource. - getResource(String) - Static method in class dev.mccue.guava.io.Resources
- getResult() - Method in interface dev.mccue.guava.io.ByteProcessor
-
Return the result of processing all the bytes.
- getResult() - Method in interface dev.mccue.guava.io.LineProcessor
-
Return the result of processing all the lines.
H
- hash(HashFunction) - Method in class dev.mccue.guava.io.ByteSource
-
Hashes the contents of this byte source using the given hash function.
- hash(File, HashFunction) - Static method in class dev.mccue.guava.io.Files
-
Deprecated.Prefer
asByteSource(file).hash(hashFunction).
I
- ignoreCase() - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns an encoding that behaves equivalently to this encoding, but decodes letters without regard to case.
- InsecureRecursiveDeleteException - Exception in dev.mccue.guava.io
-
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.,
SecureDirectoryStreamis not supported). - InsecureRecursiveDeleteException(String) - Constructor for exception dev.mccue.guava.io.InsecureRecursiveDeleteException
- isDirectory() - Static method in class dev.mccue.guava.io.Files
-
Returns a predicate that returns the result of
File.isDirectory()on input files. - isDirectory(LinkOption...) - Static method in class dev.mccue.guava.io.MoreFiles
-
Returns a predicate that returns the result of
Files.isDirectory(Path, LinkOption...)on input paths with the given link options. - isEmpty() - Method in class dev.mccue.guava.io.ByteSource
-
Returns whether the source has zero bytes.
- isEmpty() - Method in class dev.mccue.guava.io.CharSource
-
Returns whether the source has zero chars.
- isFile() - Static method in class dev.mccue.guava.io.Files
-
Returns a predicate that returns the result of
File.isFile()on input files. - isRegularFile(LinkOption...) - Static method in class dev.mccue.guava.io.MoreFiles
-
Returns a predicate that returns the result of
Files.isRegularFile(Path, LinkOption...)on input paths with the given link options.
L
- length() - Method in class dev.mccue.guava.io.CharSource
-
Returns the length of this source in chars, even if doing so requires opening and traversing an entire stream.
- lengthIfKnown() - Method in class dev.mccue.guava.io.CharSource
-
Returns the size of this source in chars, if the size can be easily determined without actually opening the data stream.
- limit(InputStream, long) - Static method in class dev.mccue.guava.io.ByteStreams
-
Wraps a
InputStream, limiting the number of bytes which can be read. - LineProcessor<T extends @Nullable Object> - Interface in dev.mccue.guava.io
-
A callback to be used with the streaming
readLinesmethods. - LineReader - Class in dev.mccue.guava.io
-
A class for reading lines of text.
- LineReader(Readable) - Constructor for class dev.mccue.guava.io.LineReader
-
Creates a new instance that will read lines from the given
Readableobject. - lines() - Method in class dev.mccue.guava.io.CharSource
-
Opens a new
Streamfor reading text one line at a time from this source. - listFiles(Path) - Static method in class dev.mccue.guava.io.MoreFiles
-
Returns an immutable list of paths to the files contained in the given directory.
- LittleEndianDataInputStream - Class in dev.mccue.guava.io
-
An implementation of
DataInputthat uses little-endian byte ordering for readingshort,int,float,double, andlongvalues. - LittleEndianDataInputStream(InputStream) - Constructor for class dev.mccue.guava.io.LittleEndianDataInputStream
-
Creates a
LittleEndianDataInputStreamthat wraps the given stream. - LittleEndianDataOutputStream - Class in dev.mccue.guava.io
-
An implementation of
DataOutputthat uses little-endian byte ordering for writingchar,short,int,float,double, andlongvalues. - LittleEndianDataOutputStream(OutputStream) - Constructor for class dev.mccue.guava.io.LittleEndianDataOutputStream
-
Creates a
LittleEndianDataOutputStreamthat wraps the given stream. - lowerCase() - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns an encoding that behaves equivalently to this encoding, but encodes and decodes with lowercase letters.
M
- map(File) - Static method in class dev.mccue.guava.io.Files
-
Fully maps a file read-only in to memory as per
FileChannel.map(MapMode, long, long). - map(File, FileChannel.MapMode) - Static method in class dev.mccue.guava.io.Files
-
Fully maps a file in to memory as per
FileChannel.map(MapMode, long, long)using the requestedFileChannel.MapMode. - map(File, FileChannel.MapMode, long) - Static method in class dev.mccue.guava.io.Files
-
Maps a file in to memory as per
FileChannel.map(MapMode, long, long)using the requestedFileChannel.MapMode. - mark(int) - Method in class dev.mccue.guava.io.CountingInputStream
- MoreFiles - Class in dev.mccue.guava.io
- move(File, File) - Static method in class dev.mccue.guava.io.Files
-
Moves a file from one path to another.
N
- newDataInput(byte[]) - Static method in class dev.mccue.guava.io.ByteStreams
-
Returns a new
ByteArrayDataInputinstance to read from thebytesarray from the beginning. - newDataInput(byte[], int) - Static method in class dev.mccue.guava.io.ByteStreams
-
Returns a new
ByteArrayDataInputinstance to read from thebytesarray, starting at the given position. - newDataInput(ByteArrayInputStream) - Static method in class dev.mccue.guava.io.ByteStreams
-
Returns a new
ByteArrayDataInputinstance to read from the givenByteArrayInputStream. - newDataOutput() - Static method in class dev.mccue.guava.io.ByteStreams
-
Returns a new
ByteArrayDataOutputinstance with a default size. - newDataOutput(int) - Static method in class dev.mccue.guava.io.ByteStreams
-
Returns a new
ByteArrayDataOutputinstance sized to holdsizebytes before resizing. - newDataOutput(ByteArrayOutputStream) - Static method in class dev.mccue.guava.io.ByteStreams
-
Returns a new
ByteArrayDataOutputinstance which writes to the givenByteArrayOutputStream. - newReader(File, Charset) - Static method in class dev.mccue.guava.io.Files
-
Returns a buffered reader that reads from a file using the given character set.
- newWriter(File, Charset) - Static method in class dev.mccue.guava.io.Files
-
Returns a buffered writer that writes to a file using the given character set.
- nullOutputStream() - Static method in class dev.mccue.guava.io.ByteStreams
-
Returns an
OutputStreamthat simply discards written bytes. - nullWriter() - Static method in class dev.mccue.guava.io.CharStreams
-
Returns a
Writerthat simply discards written chars.
O
- omitPadding() - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns an encoding that behaves equivalently to this encoding, but omits any padding characters as specified by RFC 4648 section 3.2, Padding of Encoded Data.
- openBufferedStream() - Method in class dev.mccue.guava.io.ByteSink
-
Opens a new buffered
OutputStreamfor writing to this sink. - openBufferedStream() - Method in class dev.mccue.guava.io.ByteSource
-
Opens a new buffered
InputStreamfor reading from this source. - openBufferedStream() - Method in class dev.mccue.guava.io.CharSink
-
Opens a new buffered
Writerfor writing to this sink. - openBufferedStream() - Method in class dev.mccue.guava.io.CharSource
-
Opens a new
BufferedReaderfor reading from this source. - openStream() - Method in class dev.mccue.guava.io.ByteSink
-
Opens a new
OutputStreamfor writing to this sink. - openStream() - Method in class dev.mccue.guava.io.ByteSource
-
Opens a new
InputStreamfor reading from this source. - openStream() - Method in class dev.mccue.guava.io.CharSink
-
Opens a new
Writerfor writing to this sink. - openStream() - Method in class dev.mccue.guava.io.CharSource
-
Opens a new
Readerfor reading from this source.
P
- PatternFilenameFilter - Class in dev.mccue.guava.io
-
File name filter that only accepts files matching a regular expression.
- PatternFilenameFilter(String) - Constructor for class dev.mccue.guava.io.PatternFilenameFilter
-
Constructs a pattern file name filter object.
- PatternFilenameFilter(Pattern) - Constructor for class dev.mccue.guava.io.PatternFilenameFilter
-
Constructs a pattern file name filter object.
- processBytes(byte[], int, int) - Method in interface dev.mccue.guava.io.ByteProcessor
-
This method will be called for each chunk of bytes in an input stream.
- processLine(String) - Method in interface dev.mccue.guava.io.LineProcessor
-
This method will be called once for each line.
R
- read() - Method in class dev.mccue.guava.io.ByteSource
-
Reads the full contents of this byte source as a byte array.
- read() - Method in class dev.mccue.guava.io.CharSource
-
Reads the contents of this source as a string.
- read() - Method in class dev.mccue.guava.io.CountingInputStream
- read(byte[], int, int) - Method in class dev.mccue.guava.io.CountingInputStream
- read(ByteProcessor<T>) - Method in class dev.mccue.guava.io.ByteSource
-
Reads the contents of this byte source using the given
processorto process bytes as they are read. - read(InputStream, byte[], int, int) - Static method in class dev.mccue.guava.io.ByteStreams
-
Reads some bytes from an input stream and stores them into the buffer array
b. - readBoolean() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readBoolean() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
- readByte() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readByte() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
- readBytes(File, ByteProcessor<T>) - Static method in class dev.mccue.guava.io.Files
-
Deprecated.Prefer
asByteSource(file).read(processor). - readBytes(InputStream, ByteProcessor<T>) - Static method in class dev.mccue.guava.io.ByteStreams
-
Process the bytes of the given input stream using the given processor.
- readChar() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readChar() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
-
Reads a char as specified by
DataInputStream.readChar(), except using little-endian byte order. - readDouble() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readDouble() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
-
Reads a
doubleas specified byDataInputStream.readDouble(), except using little-endian byte order. - readFirstLine() - Method in class dev.mccue.guava.io.CharSource
-
Reads the first line of this source as a string.
- readFirstLine(File, Charset) - Static method in class dev.mccue.guava.io.Files
-
Deprecated.Prefer
asCharSource(file, charset).readFirstLine(). - readFloat() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readFloat() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
-
Reads a
floatas specified byDataInputStream.readFloat(), except using little-endian byte order. - readFully(byte[]) - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readFully(byte[]) - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
- readFully(byte[], int, int) - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readFully(byte[], int, int) - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
- readFully(InputStream, byte[]) - Static method in class dev.mccue.guava.io.ByteStreams
-
Attempts to read enough bytes from the stream to fill the given byte array, with the same behavior as
DataInput.readFully(byte[]). - readFully(InputStream, byte[], int, int) - Static method in class dev.mccue.guava.io.ByteStreams
-
Attempts to read
lenbytes from the stream into the given array starting atoff, with the same behavior asDataInput.readFully(byte[], int, int). - readInt() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readInt() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
-
Reads an integer as specified by
DataInputStream.readInt(), except using little-endian byte order. - readLine() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readLine() - Method in class dev.mccue.guava.io.LineReader
-
Reads a line of text.
- readLine() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
-
This method will throw an
UnsupportedOperationException. - readLines() - Method in class dev.mccue.guava.io.CharSource
-
Reads all the lines of this source as a list of strings.
- readLines(LineProcessor<T>) - Method in class dev.mccue.guava.io.CharSource
-
Reads lines of text from this source, processing each line as it is read using the given
processor. - readLines(File, Charset) - Static method in class dev.mccue.guava.io.Files
-
Reads all of the lines from a file.
- readLines(File, Charset, LineProcessor<T>) - Static method in class dev.mccue.guava.io.Files
-
Deprecated.Prefer
asCharSource(file, charset).readLines(callback). - readLines(Readable) - Static method in class dev.mccue.guava.io.CharStreams
-
Reads all of the lines from a
Readableobject. - readLines(Readable, LineProcessor<T>) - Static method in class dev.mccue.guava.io.CharStreams
-
Streams lines from a
Readableobject, stopping when the processor returnsfalseor all lines have been read and returning the result produced by the processor. - readLines(URL, Charset) - Static method in class dev.mccue.guava.io.Resources
-
Reads all of the lines from a URL.
- readLines(URL, Charset, LineProcessor<T>) - Static method in class dev.mccue.guava.io.Resources
-
Streams lines from a URL, stopping when our callback returns false, or we have read all of the lines.
- readLong() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readLong() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
-
Reads a
longas specified byDataInputStream.readLong(), except using little-endian byte order. - readShort() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readShort() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
-
Reads a
shortas specified byDataInputStream.readShort(), except using little-endian byte order. - readUnsignedByte() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readUnsignedByte() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
- readUnsignedShort() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readUnsignedShort() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
-
Reads an unsigned
shortas specified byDataInputStream.readUnsignedShort(), except using little-endian byte order. - readUTF() - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- readUTF() - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
- RecursiveDeleteOption - Enum in dev.mccue.guava.io
-
Options for use with recursive delete methods (
MoreFiles.deleteRecursively(java.nio.file.Path, dev.mccue.guava.io.RecursiveDeleteOption...)andMoreFiles.deleteDirectoryContents(java.nio.file.Path, dev.mccue.guava.io.RecursiveDeleteOption...)). - register(C) - Method in class dev.mccue.guava.io.Closer
- reset() - Method in class dev.mccue.guava.io.CountingInputStream
- reset() - Method in class dev.mccue.guava.io.FileBackedOutputStream
-
Calls
FileBackedOutputStream.close()if not already closed, and then resets this object back to its initial state, for reuse. - Resources - Class in dev.mccue.guava.io
-
Provides utility methods for working with resources in the classpath.
- rethrow(Throwable) - Method in class dev.mccue.guava.io.Closer
-
Stores the given throwable and rethrows it.
- rethrow(Throwable, Class<X>) - Method in class dev.mccue.guava.io.Closer
-
Stores the given throwable and rethrows it.
- rethrow(Throwable, Class<X1>, Class<X2>) - Method in class dev.mccue.guava.io.Closer
-
Stores the given throwable and rethrows it.
S
- simplifyPath(String) - Static method in class dev.mccue.guava.io.Files
-
Returns the lexically cleaned form of the path name, usually (but not always) equivalent to the original.
- size() - Method in class dev.mccue.guava.io.ByteSource
-
Returns the size of this source in bytes, even if doing so requires opening and traversing an entire stream.
- sizeIfKnown() - Method in class dev.mccue.guava.io.ByteSource
-
Returns the size of this source in bytes, if the size can be easily determined without actually opening the data stream.
- skip(long) - Method in class dev.mccue.guava.io.CountingInputStream
- skipBytes(int) - Method in interface dev.mccue.guava.io.ByteArrayDataInput
- skipBytes(int) - Method in class dev.mccue.guava.io.LittleEndianDataInputStream
- skipFully(InputStream, long) - Static method in class dev.mccue.guava.io.ByteStreams
-
Discards
nbytes of data from the input stream. - skipFully(Reader, long) - Static method in class dev.mccue.guava.io.CharStreams
-
Discards
ncharacters of data from the reader. - slice(long, long) - Method in class dev.mccue.guava.io.ByteSource
-
Returns a view of a slice of this byte source that is at most
lengthbytes long starting at the givenoffset.
T
- toByteArray() - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
-
Returns the contents that have been written to this instance, as a byte array.
- toByteArray(File) - Static method in class dev.mccue.guava.io.Files
-
Reads all bytes from a file into a byte array.
- toByteArray(InputStream) - Static method in class dev.mccue.guava.io.ByteStreams
-
Reads all bytes from an input stream into a byte array.
- toByteArray(URL) - Static method in class dev.mccue.guava.io.Resources
-
Reads all bytes from a URL into a byte array.
- toString(File, Charset) - Static method in class dev.mccue.guava.io.Files
-
Deprecated.Prefer
asCharSource(file, charset).read(). - toString(Readable) - Static method in class dev.mccue.guava.io.CharStreams
- toString(URL, Charset) - Static method in class dev.mccue.guava.io.Resources
-
Reads all characters from a URL into a
String, using the given character set. - touch(File) - Static method in class dev.mccue.guava.io.Files
-
Creates an empty file or updates the last updated timestamp on the same as the unix command of the same name.
- touch(Path) - Static method in class dev.mccue.guava.io.MoreFiles
-
Like the unix command of the same name, creates an empty file or updates the last modified timestamp of the existing file at the given path to the current system time.
U
- upperCase() - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns an encoding that behaves equivalently to this encoding, but encodes and decodes with uppercase letters.
V
- valueOf(String) - Static method in enum dev.mccue.guava.io.FileWriteMode
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum dev.mccue.guava.io.RecursiveDeleteOption
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum dev.mccue.guava.io.FileWriteMode
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum dev.mccue.guava.io.RecursiveDeleteOption
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- withPadChar(char) - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns an encoding that behaves equivalently to this encoding, but uses an alternate character for padding.
- withSeparator(String, int) - Method in class dev.mccue.guava.io.BaseEncoding
-
Returns an encoding that behaves equivalently to this encoding, but adds a separator string after every
ncharacters. - wrap(byte[]) - Static method in class dev.mccue.guava.io.ByteSource
-
Returns a view of the given byte array as a
ByteSource. - wrap(CharSequence) - Static method in class dev.mccue.guava.io.CharSource
-
Returns a view of the given character sequence as a
CharSource. - write(byte[]) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- write(byte[]) - Method in class dev.mccue.guava.io.ByteSink
-
Writes all the given bytes to this sink.
- write(byte[]) - Method in class dev.mccue.guava.io.FileBackedOutputStream
- write(byte[], int, int) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- write(byte[], int, int) - Method in class dev.mccue.guava.io.CountingOutputStream
- write(byte[], int, int) - Method in class dev.mccue.guava.io.FileBackedOutputStream
- write(byte[], int, int) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
- write(byte[], File) - Static method in class dev.mccue.guava.io.Files
-
Overwrites a file with the contents of a byte array.
- write(int) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- write(int) - Method in class dev.mccue.guava.io.CountingOutputStream
- write(int) - Method in class dev.mccue.guava.io.FileBackedOutputStream
- write(CharSequence) - Method in class dev.mccue.guava.io.CharSink
-
Writes the given character sequence to this sink.
- write(CharSequence, File, Charset) - Static method in class dev.mccue.guava.io.Files
-
Deprecated.Prefer
asCharSink(to, charset).write(from). - writeBoolean(boolean) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeBoolean(boolean) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
- writeByte(int) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeByte(int) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
- writeBytes(String) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
-
Deprecated.This method is dangerous as it discards the high byte of every character. For UTF-8, use
write(s.getBytes(StandardCharsets.UTF_8)). - writeBytes(String) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
-
Deprecated.The semantics of
writeBytes(String s)are considered dangerous. Please useLittleEndianDataOutputStream.writeUTF(String s),LittleEndianDataOutputStream.writeChars(String s)or another write method instead. - writeChar(int) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeChar(int) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
-
Writes a char as specified by
DataOutputStream.writeChar(int), except using little-endian byte order. - writeChars(String) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeChars(String) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
-
Writes a
Stringas specified byDataOutputStream.writeChars(String), except each character is written using little-endian byte order. - writeDouble(double) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeDouble(double) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
-
Writes a
doubleas specified byDataOutputStream.writeDouble(double), except using little-endian byte order. - writeFloat(float) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeFloat(float) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
-
Writes a
floatas specified byDataOutputStream.writeFloat(float), except using little-endian byte order. - writeFrom(InputStream) - Method in class dev.mccue.guava.io.ByteSink
-
Writes all the bytes from the given
InputStreamto this sink. - writeFrom(Readable) - Method in class dev.mccue.guava.io.CharSink
- writeInt(int) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeInt(int) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
-
Writes an
intas specified byDataOutputStream.writeInt(int), except using little-endian byte order. - writeLines(Iterable<? extends CharSequence>) - Method in class dev.mccue.guava.io.CharSink
-
Writes the given lines of text to this sink with each line (including the last) terminated with the operating system's default line separator.
- writeLines(Iterable<? extends CharSequence>, String) - Method in class dev.mccue.guava.io.CharSink
-
Writes the given lines of text to this sink with each line (including the last) terminated with the given line separator.
- writeLines(Stream<? extends CharSequence>) - Method in class dev.mccue.guava.io.CharSink
-
Writes the given lines of text to this sink with each line (including the last) terminated with the operating system's default line separator.
- writeLines(Stream<? extends CharSequence>, String) - Method in class dev.mccue.guava.io.CharSink
-
Writes the given lines of text to this sink with each line (including the last) terminated with the given line separator.
- writeLong(long) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeLong(long) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
-
Writes a
longas specified byDataOutputStream.writeLong(long), except using little-endian byte order. - writeShort(int) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeShort(int) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
-
Writes a
shortas specified byDataOutputStream.writeShort(int), except using little-endian byte order. - writeUTF(String) - Method in interface dev.mccue.guava.io.ByteArrayDataOutput
- writeUTF(String) - Method in class dev.mccue.guava.io.LittleEndianDataOutputStream
All Classes and Interfaces|All Packages|Serialized Form
asCharSink(to, charset, FileWriteMode.APPEND).write(from). This method is scheduled to be removed in October 2019.