- base16() - Static method in class com.diffplug.common.io.BaseEncoding
-
- base32() - Static method in class com.diffplug.common.io.BaseEncoding
-
- base32Hex() - Static method in class com.diffplug.common.io.BaseEncoding
-
The “base32hex” encoding specified by
RFC 4648 section 7, Base 32 Encoding with Extended Hex Alphabet.
- base64() - Static method in class com.diffplug.common.io.BaseEncoding
-
- base64Url() - Static method in class com.diffplug.common.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 com.diffplug.common.io
-
A binary encoding scheme for reversibly translating between byte sequences and printable ASCII strings.
- BaseEncoding.DecodingException - Exception in com.diffplug.common.io
-
Exception indicating invalid base-encoded input encountered while decoding.
- bits() - Method in class com.diffplug.common.hash.HashCode
-
Returns the number of bits in this hash code; a positive multiple of 8.
- bits() - Method in interface com.diffplug.common.hash.HashFunction
-
Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.
- BloomFilter<T> - Class in com.diffplug.common.hash
-
A Bloom filter for instances of T
.
- ByteArrayDataInput - Interface in com.diffplug.common.io
-
An extension of
DataInput
for reading from in-memory byte arrays; its methods offer identical functionality but do not throw
IOException
.
- ByteArrayDataOutput - Interface in com.diffplug.common.io
-
An extension of
DataOutput
for writing to in-memory byte arrays; its methods offer identical functionality but do not throw
IOException
.
- byteArrayFunnel() - Static method in class com.diffplug.common.hash.Funnels
-
Returns a funnel that extracts the bytes from a byte
array.
- ByteProcessor<T> - Interface in com.diffplug.common.io
-
A callback interface to process bytes from a stream.
- ByteSink - Class in com.diffplug.common.io
-
A destination to which bytes can be written, such as a file.
- ByteSink() - Constructor for class com.diffplug.common.io.ByteSink
-
Constructor for use by subclasses.
- ByteSource - Class in com.diffplug.common.io
-
A readable source of bytes, such as a file.
- ByteSource() - Constructor for class com.diffplug.common.io.ByteSource
-
Constructor for use by subclasses.
- ByteStreams - Class in com.diffplug.common.io
-
Provides utility methods for working with byte arrays and I/O streams.
- CharSink - Class in com.diffplug.common.io
-
A destination to which characters can be written, such as a text file.
- CharSink() - Constructor for class com.diffplug.common.io.CharSink
-
Constructor for use by subclasses.
- CharSource - Class in com.diffplug.common.io
-
A readable source of characters, such as a text file.
- CharSource() - Constructor for class com.diffplug.common.io.CharSource
-
Constructor for use by subclasses.
- CharStreams - Class in com.diffplug.common.io
-
Provides utility methods for working with character streams.
- close() - Method in class com.diffplug.common.hash.HashingOutputStream
-
- close(Closeable, boolean) - Static method in class com.diffplug.common.io.Closeables
-
Closes a
Closeable
, with control over whether an
IOException
may be thrown.
- close() - Method in class com.diffplug.common.io.Closer
-
Closes all Closeable
instances that have been added to this Closer
.
- close() - Method in class com.diffplug.common.io.CountingOutputStream
-
- close() - Method in class com.diffplug.common.io.FileBackedOutputStream
-
- close() - Method in class com.diffplug.common.io.LittleEndianDataOutputStream
-
- Closeables - Class in com.diffplug.common.io
-
Utility methods for working with
Closeable
objects.
- closeQuietly(InputStream) - Static method in class com.diffplug.common.io.Closeables
-
Closes the given
InputStream
, logging any
IOException
that’s thrown rather than propagating it.
- closeQuietly(Reader) - Static method in class com.diffplug.common.io.Closeables
-
Closes the given
Reader
, logging any
IOException
that’s thrown rather than propagating it.
- Closer - Class in com.diffplug.common.io
-
A
Closeable
that collects
Closeable
resources and closes them all when it is
closed.
- com.diffplug.common.hash - package com.diffplug.common.hash
-
Hash functions and related structures.
- com.diffplug.common.io - package com.diffplug.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.
- combineOrdered(Iterable<HashCode>) - Static method in class com.diffplug.common.hash.Hashing
-
Returns a hash code, having the same bit length as each of the input hash codes, that combines the information of these hash codes in an ordered fashion.
- combineUnordered(Iterable<HashCode>) - Static method in class com.diffplug.common.hash.Hashing
-
Returns a hash code, having the same bit length as each of the input hash codes, that combines the information of these hash codes in an unordered fashion.
- concat(Iterable<? extends ByteSource>) - Static method in class com.diffplug.common.io.ByteSource
-
Concatenates multiple
ByteSource
instances into a single source.
- concat(Iterator<? extends ByteSource>) - Static method in class com.diffplug.common.io.ByteSource
-
Concatenates multiple
ByteSource
instances into a single source.
- concat(ByteSource...) - Static method in class com.diffplug.common.io.ByteSource
-
Concatenates multiple
ByteSource
instances into a single source.
- concat(Iterable<? extends CharSource>) - Static method in class com.diffplug.common.io.CharSource
-
Concatenates multiple
CharSource
instances into a single source.
- concat(Iterator<? extends CharSource>) - Static method in class com.diffplug.common.io.CharSource
-
Concatenates multiple
CharSource
instances into a single source.
- concat(CharSource...) - Static method in class com.diffplug.common.io.CharSource
-
Concatenates multiple
CharSource
instances into a single source.
- concatenating(HashFunction, HashFunction, HashFunction...) - Static method in class com.diffplug.common.hash.Hashing
-
Returns a hash function which computes its hash code by concatenating the hash codes of the underlying hash functions together.
- concatenating(Iterable<HashFunction>) - Static method in class com.diffplug.common.hash.Hashing
-
Returns a hash function which computes its hash code by concatenating the hash codes of the underlying hash functions together.
- consistentHash(HashCode, int) - Static method in class com.diffplug.common.hash.Hashing
-
Assigns to hashCode
a “bucket” in the range [0, buckets)
, in a uniform manner that minimizes the need for remapping as buckets
grows.
- consistentHash(long, int) - Static method in class com.diffplug.common.hash.Hashing
-
Assigns to input
a “bucket” in the range [0, buckets)
, in a uniform manner that minimizes the need for remapping as buckets
grows.
- contentEquals(ByteSource) - Method in class com.diffplug.common.io.ByteSource
-
Checks that the contents of this byte source are equal to the contents of the given byte source.
- copy() - Method in class com.diffplug.common.hash.BloomFilter
-
Creates a new BloomFilter
that’s a copy of this instance.
- copy(InputStream, OutputStream) - Static method in class com.diffplug.common.io.ByteStreams
-
Copies all bytes from the input stream to the output stream.
- copy(ReadableByteChannel, WritableByteChannel) - Static method in class com.diffplug.common.io.ByteStreams
-
Copies all bytes from the readable channel to the writable channel.
- copy(Readable, Appendable) - Static method in class com.diffplug.common.io.CharStreams
-
- copy(File, OutputStream) - Static method in class com.diffplug.common.io.Files
-
Copies all bytes from a file to an output stream.
- copy(File, File) - Static method in class com.diffplug.common.io.Files
-
Copies all the bytes from one file to another.
- copy(File, Charset, Appendable) - Static method in class com.diffplug.common.io.Files
-
Copies all characters from a file to an appendable object, using the given character set.
- copy(URL, OutputStream) - Static method in class com.diffplug.common.io.Resources
-
Copies all bytes from a URL to an output stream.
- copyTo(OutputStream) - Method in class com.diffplug.common.io.ByteSource
-
Copies the contents of this byte source to the given OutputStream
.
- copyTo(ByteSink) - Method in class com.diffplug.common.io.ByteSource
-
Copies the contents of this byte source to the given ByteSink
.
- copyTo(Appendable) - Method in class com.diffplug.common.io.CharSource
-
- copyTo(CharSink) - Method in class com.diffplug.common.io.CharSource
-
Copies the contents of this source to the given sink.
- CountingInputStream - Class in com.diffplug.common.io
-
- CountingInputStream(InputStream) - Constructor for class com.diffplug.common.io.CountingInputStream
-
Wraps another input stream, counting the number of bytes read.
- CountingOutputStream - Class in com.diffplug.common.io
-
An OutputStream that counts the number of bytes written.
- CountingOutputStream(OutputStream) - Constructor for class com.diffplug.common.io.CountingOutputStream
-
Wraps another output stream, counting the number of bytes written.
- crc32() - Static method in class com.diffplug.common.hash.Hashing
-
Returns a hash function implementing the CRC-32 checksum algorithm (32 hash bits) by delegating to the
CRC32
Checksum
.
- crc32c() - Static method in class com.diffplug.common.hash.Hashing
-
Returns a hash function implementing the CRC32C checksum algorithm (32 hash bits) as described by RFC 3720, Section 12.1.
- create(Funnel<? super T>, int, double) - Static method in class com.diffplug.common.hash.BloomFilter
-
Creates a
BloomFilter
with the expected number of insertions and expected false positive probability.
- create(Funnel<? super T>, long, double) - Static method in class com.diffplug.common.hash.BloomFilter
-
Creates a
BloomFilter
with the expected number of insertions and expected false positive probability.
- create(Funnel<? super T>, int) - Static method in class com.diffplug.common.hash.BloomFilter
-
Creates a
BloomFilter
with the expected number of insertions and a default expected false positive probability of 3%.
- create(Funnel<? super T>, long) - Static method in class com.diffplug.common.hash.BloomFilter
-
Creates a
BloomFilter
with the expected number of insertions and a default expected false positive probability of 3%.
- create() - Static method in class com.diffplug.common.io.Closer
-
- createParentDirs(File) - Static method in class com.diffplug.common.io.Files
-
Creates any necessary but nonexistent parent directories of the specified file.
- createTempDir() - Static method in class com.diffplug.common.io.Files
-
Atomically creates a new directory somewhere beneath the system’s temporary directory (as defined by the java.io.tmpdir
system property), and returns its name.
- hash() - Method in interface com.diffplug.common.hash.Hasher
-
Computes a hash code based on the data that have been provided to this hasher.
- hash() - Method in class com.diffplug.common.hash.HashingInputStream
-
Returns the
HashCode
based on the data read from this stream.
- hash() - Method in class com.diffplug.common.hash.HashingOutputStream
-
Returns the
HashCode
based on the data written to this stream.
- hash(HashFunction) - Method in class com.diffplug.common.io.ByteSource
-
Hashes the contents of this byte source using the given hash function.
- hash(File, HashFunction) - Static method in class com.diffplug.common.io.Files
-
Computes the hash code of the file
using hashFunction
.
- hashBytes(byte[]) - Method in interface com.diffplug.common.hash.HashFunction
-
Shortcut for newHasher().putBytes(input).hash()
.
- hashBytes(byte[], int, int) - Method in interface com.diffplug.common.hash.HashFunction
-
Shortcut for newHasher().putBytes(input, off, len).hash()
.
- hashCode() - Method in class com.diffplug.common.hash.BloomFilter
-
- HashCode - Class in com.diffplug.common.hash
-
An immutable hash code of arbitrary bit length.
- hashCode() - Method in class com.diffplug.common.hash.HashCode
-
Returns a “Java hash code” for this HashCode
instance; this is well-defined (so, for example, you can safely put HashCode
instances into a HashSet
) but is otherwise probably not what you want to use.
- hashCode() - Method in interface com.diffplug.common.hash.Hasher
-
- Hasher - Interface in com.diffplug.common.hash
-
A
PrimitiveSink
that can compute a hash code after reading the input.
- HashFunction - Interface in com.diffplug.common.hash
-
A hash function is a collision-averse pure function that maps an arbitrary block of data to a number called a hash code.
- Hashing - Class in com.diffplug.common.hash
-
Static methods to obtain
HashFunction
instances, and other static hashing-related utilities.
- HashingInputStream - Class in com.diffplug.common.hash
-
An
InputStream
that maintains a hash of the data read from it.
- HashingInputStream(HashFunction, InputStream) - Constructor for class com.diffplug.common.hash.HashingInputStream
-
Creates an input stream that hashes using the given
HashFunction
and delegates all data read from it to the underlying
InputStream
.
- HashingOutputStream - Class in com.diffplug.common.hash
-
An
OutputStream
that maintains a hash of the data written to it.
- HashingOutputStream(HashFunction, OutputStream) - Constructor for class com.diffplug.common.hash.HashingOutputStream
-
Creates an output stream that hashes using the given
HashFunction
, and forwards all data written to it to the underlying
OutputStream
.
- hashInt(int) - Method in interface com.diffplug.common.hash.HashFunction
-
Shortcut for newHasher().putInt(input).hash()
; returns the hash code for the given int
value, interpreted in little-endian byte order.
- hashLong(long) - Method in interface com.diffplug.common.hash.HashFunction
-
Shortcut for newHasher().putLong(input).hash()
; returns the hash code for the given long
value, interpreted in little-endian byte order.
- hashObject(T, Funnel<? super T>) - Method in interface com.diffplug.common.hash.HashFunction
-
Shortcut for newHasher().putObject(instance, funnel).hash()
.
- hashString(CharSequence, Charset) - Method in interface com.diffplug.common.hash.HashFunction
-
Shortcut for newHasher().putString(input, charset).hash()
.
- hashUnencodedChars(CharSequence) - Method in interface com.diffplug.common.hash.HashFunction
-
Shortcut for newHasher().putUnencodedChars(input).hash()
.
- padToLong() - Method in class com.diffplug.common.hash.HashCode
-
If this hashcode has enough bits, returns asLong()
, otherwise returns a long
value with asBytes()
as the least-significant bytes and 0x00
as the remaining most-significant bytes.
- PatternFilenameFilter - Class in com.diffplug.common.io
-
File name filter that only accepts files matching a regular expression.
- PatternFilenameFilter(String) - Constructor for class com.diffplug.common.io.PatternFilenameFilter
-
Constructs a pattern file name filter object.
- PatternFilenameFilter(Pattern) - Constructor for class com.diffplug.common.io.PatternFilenameFilter
-
Constructs a pattern file name filter object.
- PrimitiveSink - Interface in com.diffplug.common.hash
-
An object which can receive a stream of primitive values.
- processBytes(byte[], int, int) - Method in interface com.diffplug.common.io.ByteProcessor
-
This method will be called for each chunk of bytes in an input stream.
- processLine(String) - Method in interface com.diffplug.common.io.LineProcessor
-
This method will be called once for each line.
- put(T) - Method in class com.diffplug.common.hash.BloomFilter
-
Puts an element into this BloomFilter
.
- putAll(BloomFilter<T>) - Method in class com.diffplug.common.hash.BloomFilter
-
Combines this bloom filter with another bloom filter by performing a bitwise OR of the underlying data.
- putBoolean(boolean) - Method in interface com.diffplug.common.hash.Hasher
-
Equivalent to putByte(b ? (byte) 1 : (byte) 0)
.
- putBoolean(boolean) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts a boolean into this sink.
- putByte(byte) - Method in interface com.diffplug.common.hash.Hasher
-
- putByte(byte) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts a byte into this sink.
- putBytes(byte[]) - Method in interface com.diffplug.common.hash.Hasher
-
- putBytes(byte[], int, int) - Method in interface com.diffplug.common.hash.Hasher
-
- putBytes(byte[]) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts an array of bytes into this sink.
- putBytes(byte[], int, int) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts a chunk of an array of bytes into this sink.
- putChar(char) - Method in interface com.diffplug.common.hash.Hasher
-
- putChar(char) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts a character into this sink.
- putDouble(double) - Method in interface com.diffplug.common.hash.Hasher
-
Equivalent to putLong(Double.doubleToRawLongBits(d))
.
- putDouble(double) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts a double into this sink.
- putFloat(float) - Method in interface com.diffplug.common.hash.Hasher
-
Equivalent to putInt(Float.floatToRawIntBits(f))
.
- putFloat(float) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts a float into this sink.
- putInt(int) - Method in interface com.diffplug.common.hash.Hasher
-
- putInt(int) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts an int into this sink.
- putLong(long) - Method in interface com.diffplug.common.hash.Hasher
-
- putLong(long) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts a long into this sink.
- putObject(T, Funnel<? super T>) - Method in interface com.diffplug.common.hash.Hasher
-
A simple convenience for funnel.funnel(object, this)
.
- putShort(short) - Method in interface com.diffplug.common.hash.Hasher
-
- putShort(short) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts a short into this sink.
- putString(CharSequence, Charset) - Method in interface com.diffplug.common.hash.Hasher
-
Equivalent to putBytes(charSequence.toString().getBytes(charset))
.
- putString(CharSequence, Charset) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts a string into this sink using the given charset.
- putUnencodedChars(CharSequence) - Method in interface com.diffplug.common.hash.Hasher
-
Equivalent to processing each char
value in the CharSequence
, in order.
- putUnencodedChars(CharSequence) - Method in interface com.diffplug.common.hash.PrimitiveSink
-
Puts each 16-bit code unit from the
CharSequence
into this sink.
- read() - Method in class com.diffplug.common.hash.HashingInputStream
-
Reads the next byte of data from the underlying input stream and updates the hasher with the byte read.
- read(byte[], int, int) - Method in class com.diffplug.common.hash.HashingInputStream
-
Reads the specified bytes of data from the underlying input stream and updates the hasher with the bytes read.
- read() - Method in class com.diffplug.common.io.ByteSource
-
Reads the full contents of this byte source as a byte array.
- read(ByteProcessor<T>) - Method in class com.diffplug.common.io.ByteSource
-
Reads the contents of this byte source using the given processor
to process bytes as they are read.
- read(InputStream, byte[], int, int) - Static method in class com.diffplug.common.io.ByteStreams
-
Reads some bytes from an input stream and stores them into the buffer array b
.
- read() - Method in class com.diffplug.common.io.CharSource
-
Reads the contents of this source as a string.
- read() - Method in class com.diffplug.common.io.CountingInputStream
-
- read(byte[], int, int) - Method in class com.diffplug.common.io.CountingInputStream
-
- readBoolean() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readBoolean() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readByte() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readByte() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readBytes(InputStream, ByteProcessor<T>) - Static method in class com.diffplug.common.io.ByteStreams
-
Process the bytes of the given input stream using the given processor.
- readBytes(File, ByteProcessor<T>) - Static method in class com.diffplug.common.io.Files
-
Process the bytes of a file.
- readChar() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readChar() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readDouble() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readDouble() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readFirstLine() - Method in class com.diffplug.common.io.CharSource
-
Reads the first link of this source as a string.
- readFirstLine(File, Charset) - Static method in class com.diffplug.common.io.Files
-
Reads the first line from a file.
- readFloat() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readFloat() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readFrom(InputStream, Funnel<T>) - Static method in class com.diffplug.common.hash.BloomFilter
-
- readFully(byte[]) - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readFully(byte[], int, int) - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readFully(InputStream, byte[]) - Static method in class com.diffplug.common.io.ByteStreams
-
- readFully(InputStream, byte[], int, int) - Static method in class com.diffplug.common.io.ByteStreams
-
- readFully(byte[]) - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readFully(byte[], int, int) - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readInt() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readInt() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readLine() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readLine() - Method in class com.diffplug.common.io.LineReader
-
Reads a line of text.
- readLine() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readLines() - Method in class com.diffplug.common.io.CharSource
-
Reads all the lines of this source as a list of strings.
- readLines(LineProcessor<T>) - Method in class com.diffplug.common.io.CharSource
-
Reads lines of text from this source, processing each line as it is read using the given
processor
.
- readLines(Readable) - Static method in class com.diffplug.common.io.CharStreams
-
Reads all of the lines from a
Readable
object.
- readLines(Readable, LineProcessor<T>) - Static method in class com.diffplug.common.io.CharStreams
-
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.
- readLines(File, Charset) - Static method in class com.diffplug.common.io.Files
-
Reads all of the lines from a file.
- readLines(File, Charset, LineProcessor<T>) - Static method in class com.diffplug.common.io.Files
-
Streams lines from a
File
, stopping when our callback returns false, or we have read all of the lines.
- readLines(URL, Charset, LineProcessor<T>) - Static method in class com.diffplug.common.io.Resources
-
Streams lines from a URL, stopping when our callback returns false, or we have read all of the lines.
- readLines(URL, Charset) - Static method in class com.diffplug.common.io.Resources
-
Reads all of the lines from a URL.
- readLong() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readLong() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readShort() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readShort() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readUnsignedByte() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readUnsignedByte() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readUnsignedShort() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readUnsignedShort() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- readUTF() - Method in interface com.diffplug.common.io.ByteArrayDataInput
-
- readUTF() - Method in class com.diffplug.common.io.LittleEndianDataInputStream
-
- register(C) - Method in class com.diffplug.common.io.Closer
-
Registers the given
closeable
to be closed when this
Closer
is
closed.
- reset() - Method in class com.diffplug.common.hash.HashingInputStream
-
reset() is not supported for HashingInputStream.
- reset() - Method in class com.diffplug.common.io.CountingInputStream
-
- reset() - Method in class com.diffplug.common.io.FileBackedOutputStream
-
- Resources - Class in com.diffplug.common.io
-
Provides utility methods for working with resources in the classpath.
- rethrow(Throwable) - Method in class com.diffplug.common.io.Closer
-
Stores the given throwable and rethrows it.
- rethrow(Throwable, Class<X>) - Method in class com.diffplug.common.io.Closer
-
Stores the given throwable and rethrows it.
- rethrow(Throwable, Class<X1>, Class<X2>) - Method in class com.diffplug.common.io.Closer
-
Stores the given throwable and rethrows it.