Index

A B C D E F G H I L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values

A

asByteBuffer(InputStream) - Static method in class com.mastfrog.util.streams.Streams
 
asByteChannel(InputStream) - Static method in class com.mastfrog.util.streams.Streams
 
asInputStream(boolean, ByteBuffer) - Static method in class com.mastfrog.util.streams.Streams
Get a ByteBuffer as an InputStream.
asInputStream(Iterable<ByteBuffer>) - Static method in class com.mastfrog.util.streams.Streams
 
asInputStream(ByteBuffer) - Static method in class com.mastfrog.util.streams.Streams
Get a ByteBuffer as an InputStream.
asInputStream(ReadableByteChannel) - Static method in class com.mastfrog.util.streams.Streams
 
asOutputStream(ByteBuffer) - Static method in class com.mastfrog.util.streams.Streams
 
attach() - Method in interface com.mastfrog.util.file.WatchManager.RecursiveWatcher
 
available() - Method in class com.mastfrog.util.streams.ContinuousLineStream
 
available() - Method in class com.mastfrog.util.streams.ContinuousStringStream
 
available() - Method in class com.mastfrog.util.streams.HashingInputStream
 

B

blackhole(ThrowingRunnable) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Discard any attempts at writing to stdout or stderr during the closure of the passed runnable, while not interfering with output from other threads.
blackhole(ThrowingSupplier<T>) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Discard any attempts at writing to stdout or stderr during the closure of the passed supplier, while not interfering with output from other threads.
blackhole(Runnable) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Discard any attempts at writing to stdout or stderr during the closure of the passed runnable, while not interfering with output from other threads.
blackholeNonThrowing(Supplier<T>) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Discard any attempts at writing to stdout or stderr during the closure of the passed supplier, while not interfering with output from other threads.
byExtension(String) - Static method in class com.mastfrog.util.file.FileUtils
Get a predicate for filtering file streams which only lets non-folders with a give file extension delimited by . through.
bypass(Runnable) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
If any alternate stdout or stderr is set for the current thread, bypass that and use the original for one runnable; this is needed in cases where you are patching or subclassing in a library that is sloppy with stdout, but you have things you legitimately need to log, and want to be sure that a console logger logs to the right place.

C

channel(byte[]) - Method in class com.mastfrog.util.streams.Streams
Create a ReadableByteChannel over an array of bytes, for impedance matching array-oriented APIs to NIO channels.
close() - Method in class com.mastfrog.util.streams.ContinuousLineStream
Close the underlying stream.
close() - Method in class com.mastfrog.util.streams.ContinuousStringStream
 
close() - Method in class com.mastfrog.util.streams.HashingInputStream
 
close() - Method in class com.mastfrog.util.streams.HashingOutputStream
 
closeReturningTail() - Method in class com.mastfrog.util.streams.ContinuousLineStream
Close this stream, returning any already read lines and any partial line for which a newline had not yet been encountered; if at the end of the file, this will be the tail.
com.mastfrog.util.file - package com.mastfrog.util.file
 
com.mastfrog.util.path - package com.mastfrog.util.path
 
com.mastfrog.util.streams - package com.mastfrog.util.streams
 
com.mastfrog.util.streams.stdio - package com.mastfrog.util.streams.stdio
 
compareTo(Path) - Method in class com.mastfrog.util.path.ComponentUPath
 
compareTo(Path) - Method in interface com.mastfrog.util.path.UnixPath
Provides consistent, platform-indepenedent ordering: absolute is greater than non-absolute; greater name count is greater than lesser name count; if same name count, name elements are compared as case-sensitive strings.
ComponentUPath - Class in com.mastfrog.util.path
 
ContinuousLineStream - Class in com.mastfrog.util.streams
Reads a file line-by-line, but unlike a BufferedReader, does not give up when the end of the file is reached.
ContinuousLineStream(ContinuousStringStream, CharsetDecoder, int) - Constructor for class com.mastfrog.util.streams.ContinuousLineStream
 
ContinuousLineStream(ContinuousStringStream, CharsetDecoder, int, int) - Constructor for class com.mastfrog.util.streams.ContinuousLineStream
 
ContinuousStringStream - Class in com.mastfrog.util.streams
An InputStream-like construct which does not acknowledge the end of files.
ContinuousStringStream(FileChannel, int) - Constructor for class com.mastfrog.util.streams.ContinuousStringStream
 
copy(InputStream, OutputStream) - Static method in class com.mastfrog.util.streams.Streams
Writes the input stream to the output stream.
copy(InputStream, OutputStream, int) - Static method in class com.mastfrog.util.streams.Streams
Writes the input stream to the output stream.
copy(InputStream, OutputStream, OutputStream) - Static method in class com.mastfrog.util.streams.Streams
Writes the input stream to two output streams.
copyFile(File, File, boolean) - Static method in class com.mastfrog.util.streams.Streams
 
copyFolderTree(Path, Path) - Static method in class com.mastfrog.util.file.FileUtils
Copy an entire folder tree.
createDigest(String) - Static method in class com.mastfrog.util.streams.HashingInputStream
 
cursorPosition() - Method in interface com.mastfrog.util.streams.GeneralByteChannel
Returns the same value as position(), but as an int, since Java arrays do not support > Integer.MAX_VALUE arrays, so it will always fit.

D

decode(ReadableByteChannel, ByteBuffer, CharBuffer, CharsetDecoder, boolean) - Static method in class com.mastfrog.util.file.FileUtils
 
decode(ReadableByteChannel, ByteBuffer, CharBuffer, CharsetDecoder, boolean, CoderResult[]) - Static method in class com.mastfrog.util.file.FileUtils
 
decode(ReadableByteChannel, ByteBuffer, CharBuffer, CharsetDecoder, Obj<CoderResult>, boolean) - Static method in class com.mastfrog.util.file.FileUtils
 
decode(CharBuffer, CharsetDecoder) - Method in class com.mastfrog.util.streams.ContinuousStringStream
Decode whatever characters are available into the passed CharBuffer.
deleteIfExists(Path) - Static method in class com.mastfrog.util.file.FileUtils
For use mainly by tests - delete a file if it exists, swallowing any NoSuchFileException or FileNotFoundException that might be caused by a race condition; accepts null as an argument and returns false.
deleteIfExists(Path, Path...) - Static method in class com.mastfrog.util.file.FileUtils
For use mainly by tests - delete files if they exist, swallowing any NoSuchFileException or FileNotFoundException that might be caused by a race condition; accepts null as an argument and returns false.
deltree(Path) - Static method in class com.mastfrog.util.file.FileUtils
Delete a folder and its subtree; handles the condition that this method may race and files may already have been deleted (for example, shutting down a database process which deletes its pidfile) after the set of files being iterated was computed, silently.
detach() - Method in interface com.mastfrog.util.file.WatchManager.RecursiveWatcher
 

E

empty() - Static method in interface com.mastfrog.util.path.UnixPath
 
emptyAbsolute() - Static method in interface com.mastfrog.util.path.UnixPath
 
endsWith(String) - Method in class com.mastfrog.util.path.ComponentUPath
 
endsWith(Path) - Method in class com.mastfrog.util.path.ComponentUPath
 
enter(PrintStream, ThrowingRunnable) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Replace the standard output and error with a single stream, for the current thread, for the duration of the closure of the passed ThrowingRunnable.
enter(PrintStream, ThrowingSupplier<T>) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Replace the standard output and error with a single stream, for the current thread, for the duration of the closure of the passed ThrowingSupplier.
enter(PrintStream, PrintStream, ThrowingRunnable) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Replace the standard output and error with the passed streams, for the current thread, for the duration of the closure of the passed ThrowingRunnable.
enter(PrintStream, PrintStream, ThrowingSupplier<T>) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Replace the standard output and error with the passed streams, for the current thread, for the duration of the closure of the passed ThrowingSupplier.
enterNonThrowing(PrintStream, PrintStream, Runnable) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Replace the standard output and error with the passed streams, for the current thread, for the duration of the closure of the passed ThrowingRunnable.
enterNonThrowing(PrintStream, PrintStream, Supplier<T>) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Replace the standard output and error with a single stream, for the current thread, for the duration of the closure of the passed ThrowingSupplier.
enterNonThrowing(PrintStream, Runnable) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Replace the standard output and error with the passed stream, for the current thread, for the duration of the closure of the passed Runnable.
enterNonThrowing(PrintStream, Supplier<T>) - Static method in class com.mastfrog.util.streams.stdio.ThreadMappedStdIO
Replace the standard output and error with a single stream, for the current thread, for the duration of the closure of the passed ThrowingSupplier.
equals(Object) - Method in class com.mastfrog.util.path.ComponentUPath
 
extension() - Method in class com.mastfrog.util.path.ComponentUPath
 
extension() - Method in interface com.mastfrog.util.path.UnixPath
 

F

filesOnly() - Static method in class com.mastfrog.util.file.FileUtils
Get a predicate for filtering file streams which only lets files through.
filesToPaths(Iterable<File>) - Static method in class com.mastfrog.util.file.FileUtils
For adaptering old and new file apis, convert an iterator of files to an iterable of paths.
filesToPaths(Iterator<File>) - Static method in class com.mastfrog.util.file.FileUtils
For adaptering old and new file apis, convert an iterator of files to an iterator of paths.
FileUtils - Class in com.mastfrog.util.file
Utility methods for reading and writing files and directories.
find(Path, boolean, String) - Static method in class com.mastfrog.util.file.FileUtils
Find all files in the subtree under a folder which have the given file extension.
find(Path, String) - Static method in class com.mastfrog.util.file.FileUtils
Find all files in the subtree under a folder which have the given file extension.
findExecutable(String) - Static method in class com.mastfrog.util.file.FileUtils
Find an executable file with the passed file name, search the system path and the default search path (/usr/bin:/usr/local/bin:/opt/local/bin:/bin:/sbin:/usr/sbin:/opt/bin).
findExecutable(String, boolean, boolean, String...) - Static method in class com.mastfrog.util.file.FileUtils
Find an executable file with the passed file name, search the system path and the default search path (/usr/bin:/usr/local/bin:/opt/local/bin:/bin:/sbin:/usr/sbin:/opt/bin).
findExecutable(String, String...) - Static method in class com.mastfrog.util.file.FileUtils
Find an executable file with the passed file name, search the system path and the default search path (/usr/bin:/usr/local/bin:/opt/local/bin:/bin:/sbin:/usr/sbin:/opt/bin).
foldersOnly() - Static method in class com.mastfrog.util.file.FileUtils
Get a predicate for filtering file streams which only lets folders through.
forByteBuffers(Iterable<ByteBuffer>) - Static method in class com.mastfrog.util.streams.Streams
 
forByteBuffers(ByteBuffer...) - Static method in class com.mastfrog.util.streams.Streams
 

G

GeneralByteChannel - Interface in com.mastfrog.util.streams
Encapsulates ReadableByteChannel, SeekableByteChannel, WritableByteChannel to have a single type to return from Streams.channel() which is compatible with APIs that take the types implemented by FileChannel.
get(String) - Static method in interface com.mastfrog.util.path.UnixPath
 
get(String, String...) - Static method in interface com.mastfrog.util.path.UnixPath
 
get(Path) - Static method in interface com.mastfrog.util.path.UnixPath
 
get(Path, Path...) - Static method in interface com.mastfrog.util.path.UnixPath
 
getDigest() - Method in class com.mastfrog.util.streams.HashingInputStream
 
getDigest() - Method in class com.mastfrog.util.streams.HashingOutputStream
 
getFileName() - Method in class com.mastfrog.util.path.ComponentUPath
 
getFileName() - Method in interface com.mastfrog.util.path.UnixPath
 
getFileSystem() - Method in class com.mastfrog.util.path.ComponentUPath
 
getHashAsString() - Method in class com.mastfrog.util.streams.HashingInputStream
 
getHashAsString() - Method in class com.mastfrog.util.streams.HashingOutputStream
 
getName(int) - Method in class com.mastfrog.util.path.ComponentUPath
 
getName(int) - Method in interface com.mastfrog.util.path.UnixPath
 
getNameCount() - Method in class com.mastfrog.util.path.ComponentUPath
 
getParent() - Method in class com.mastfrog.util.path.ComponentUPath
 
getParent() - Method in interface com.mastfrog.util.path.UnixPath
 
getRoot() - Method in class com.mastfrog.util.path.ComponentUPath
 
getRoot() - Method in interface com.mastfrog.util.path.UnixPath
 

H

hashCode() - Method in class com.mastfrog.util.path.ComponentUPath
 
HashingInputStream - Class in com.mastfrog.util.streams
Wrapper for an input stream which can compute a hash as bytes are read.
HashingOutputStream - Class in com.mastfrog.util.streams
Output stream which wraps another output stream and computes a cryptographic hash using some algorithm as the data arrives.
HashingOutputStream(String, OutputStream) - Constructor for class com.mastfrog.util.streams.HashingOutputStream
 
hashString(byte[]) - Static method in class com.mastfrog.util.streams.HashingOutputStream
 
hasMoreLines() - Method in class com.mastfrog.util.streams.ContinuousLineStream
Determine if there are currently any more lines available.
hasNext() - Method in class com.mastfrog.util.streams.ContinuousLineStream
 
home() - Static method in class com.mastfrog.util.file.FileUtils
 
homeRelativePath(Path) - Static method in class com.mastfrog.util.file.FileUtils
Returns a shorter string prefixed with ~/ if the passed path is below the user's home dir.

I

ifDirectory(Path) - Static method in class com.mastfrog.util.file.FileUtils
 
ifDirectoryT(Path) - Static method in class com.mastfrog.util.file.FileUtils
 
ifExists(Path) - Static method in class com.mastfrog.util.file.FileUtils
 
ifExistsT(Path) - Static method in class com.mastfrog.util.file.FileUtils
 
isAbsolute() - Method in class com.mastfrog.util.path.ComponentUPath
 
isAtEndOfFile() - Method in class com.mastfrog.util.streams.ContinuousLineStream
 
isEmpty() - Method in class com.mastfrog.util.file.WatchManager
Determine if there are no active listeners on any files.
isEmpty() - Method in class com.mastfrog.util.path.ComponentUPath
 
isEmpty() - Method in interface com.mastfrog.util.path.UnixPath
 
isExtension(String) - Method in class com.mastfrog.util.path.ComponentUPath
 
isExtension(String) - Method in interface com.mastfrog.util.path.UnixPath
 
isNormalized() - Method in class com.mastfrog.util.path.ComponentUPath
 
isNormalized() - Method in interface com.mastfrog.util.path.UnixPath
Determine if this path contains no "." or ".." elements.
isOpen() - Method in class com.mastfrog.util.streams.ContinuousLineStream
 
isOpen() - Method in class com.mastfrog.util.streams.ContinuousStringStream
 
iterator() - Method in class com.mastfrog.util.path.ComponentUPath
 

L

lines(Path) - Static method in class com.mastfrog.util.file.FileUtils
Get a stream which lazily loads each line of a file as UTF-8 (unlike Files.readAllLines()) allowing very large files to be parsed line by line without iteration necessarily requiring more than (DEFAULT_BUFFER_SIZE * 2) + (maxLineLength * charset-max-bytes-per-char) bytes of memory.
lines(Path, int, Charset) - Static method in class com.mastfrog.util.file.FileUtils
Get a stream which lazily loads each line of a file (unlike Files.readAllLines()) allowing very large files to be parsed line by line without iteration necessarily requiring more than (bufferSize * 2) + (maxLineLength * charset-max-bytes-per-char) bytes of memory.
lines(Path, Charset) - Static method in class com.mastfrog.util.file.FileUtils
Get a stream which lazily loads each line of a file (unlike Files.readAllLines()) allowing very large files to be parsed line by line without iteration necessarily requiring more than (bufferSize * 2) + (maxLineLength * charset-max-bytes-per-char) bytes of memory.
link(File, File) - Static method in class com.mastfrog.util.streams.Streams
Create a relative symbolic link between two files
locate(String) - Static method in class com.mastfrog.util.streams.Streams
Locate an input stream for the provided location, possibly multiple if it is a resource from the classpath that can be found at multiple locations.

M

mark(int) - Method in class com.mastfrog.util.streams.HashingInputStream
 
markSupported() - Method in class com.mastfrog.util.streams.HashingInputStream
 

N

newFile(Path, String, String) - Method in class com.mastfrog.util.file.FileUtils
Create a new file with the given name and extension, appending "-1", "-2", and so forth to the name portion until a name is generated which does not already exist.
newPath(Path, String, String) - Method in class com.mastfrog.util.file.FileUtils
Create a path to a nonexistent file of the given name and extension, appending "-1", "-2", and so forth to the name portion until a name is generated which does not already exist.
newTempDir() - Static method in class com.mastfrog.util.file.FileUtils
Create a new temporary subfolder in the system temporary files folder.
newTempDir(String) - Static method in class com.mastfrog.util.file.FileUtils
Create a new temporary subfolder in the system temporary files folder.
newTempDir(String, PosixFilePermission...) - Static method in class com.mastfrog.util.file.FileUtils
Create a new temporary subfolder in the system temporary files folder.
newTempFile() - Static method in class com.mastfrog.util.file.FileUtils
Create a new temporary file on disk in the system temporary files folder, with default permissons.
newTempFile(String) - Static method in class com.mastfrog.util.file.FileUtils
Create a new temporary file in the system temporary files folder.
newTempFile(String, PosixFilePermission...) - Static method in class com.mastfrog.util.file.FileUtils
Create a new temporary file in the system temporary files folder.
newTempFile(PosixFilePermission...) - Static method in class com.mastfrog.util.file.FileUtils
Create a new temporary file on disk in the system temporary files folder.
newTempPath(String) - Static method in class com.mastfrog.util.file.FileUtils
Create a new file or directory path in the system temporary directory without creating anything on disk.
next() - Method in class com.mastfrog.util.streams.ContinuousLineStream
Get the next char sequence, returning none if at the end of the file or nothing further is available.
nextLine() - Method in class com.mastfrog.util.streams.ContinuousLineStream
Get the next line, if any.
normalize() - Method in class com.mastfrog.util.path.ComponentUPath
 
normalize() - Method in interface com.mastfrog.util.path.UnixPath
 
nullOutputStream() - Static method in class com.mastfrog.util.streams.Streams
 
nullPrintStream() - Static method in class com.mastfrog.util.streams.Streams
Get a print-stream that black-holes anything printed to it.
nullWriter() - Static method in class com.mastfrog.util.streams.Streams
Get a writer that black-holes anything printed to it.

O

of(File) - Static method in class com.mastfrog.util.streams.ContinuousLineStream
Create a UTF-8 line stream with a buffer size of 8192 bytes.
of(File, int) - Static method in class com.mastfrog.util.streams.ContinuousLineStream
Create a UTF-8 line stream with the specified byte buffer size.
of(File, int, Charset) - Static method in class com.mastfrog.util.streams.ContinuousLineStream
Create a line stream for the specified encoding with the specified byte buffer size.
of(Path) - Static method in class com.mastfrog.util.streams.ContinuousLineStream
Create a UTF-8 line stream with a buffer size of 8192 bytes.
of(Path, int) - Static method in class com.mastfrog.util.streams.ContinuousLineStream
Create a UTF-8 line stream with the specified byte buffer size.
of(Path, int, Charset) - Static method in class com.mastfrog.util.streams.ContinuousLineStream
Create a line stream for the specified encoding with the specified byte buffer size.

P

pathsToFiles(Iterable<Path>) - Static method in class com.mastfrog.util.file.FileUtils
For adaptering old and new file apis, convert an iterator of paths to an iterable of files.
pathsToFiles(Iterator<Path>) - Static method in class com.mastfrog.util.file.FileUtils
For adaptering old and new file apis, convert an iterator of paths to an iterator of files.
pause(boolean) - Method in class com.mastfrog.util.file.WatchManager
Pause notification of file changes - no polling runs will occur; if a polling run is currently occurring, it will complete.
position() - Method in class com.mastfrog.util.streams.ContinuousLineStream
Get the current position in the file
position() - Method in class com.mastfrog.util.streams.ContinuousStringStream
Get the postion the next read will come from
position(long) - Method in class com.mastfrog.util.streams.ContinuousLineStream
Change the position for reading in the file, discarding any enqueued partial or complete lines.
position(long) - Method in class com.mastfrog.util.streams.ContinuousStringStream
Change the position
position(long) - Method in interface com.mastfrog.util.streams.GeneralByteChannel
 

R

rawName() - Method in class com.mastfrog.util.path.ComponentUPath
 
rawName() - Method in interface com.mastfrog.util.path.UnixPath
 
read() - Method in class com.mastfrog.util.streams.HashingInputStream
 
read(byte[], int, int) - Method in class com.mastfrog.util.streams.HashingInputStream
 
readAscii(Path) - Static method in class com.mastfrog.util.file.FileUtils
Read an ASCII character sequence from a file using default settings and permissive handling of coding errors.
readAsciiString(InputStream) - Static method in class com.mastfrog.util.streams.Streams
Read an ASCII string from a stream.
readAsciiString(Path) - Static method in class com.mastfrog.util.file.FileUtils
Read an ASCII character sequence from a file using default settings and permissive handling of coding errors.
readCharSequence(boolean, int, Charset, boolean, ReadableByteChannel[], IOSupplier<ReadableByteChannel>) - Static method in class com.mastfrog.util.file.FileUtils
Read a character sequence from a channel at its current position as supplied, using the passed settings to tune performance versus memory footprint and copying overhead; the returned character sequence wraps the decoded character buffers to minimize copies.
readCharSequence(Path, boolean, int, Charset, boolean) - Static method in class com.mastfrog.util.file.FileUtils
Read a character sequence from a file using default settings and permissive handling of coding errors; the returned character sequence wraps the character buffers decoded to minimize copies.
readCharSequence(Path, int, Charset) - Static method in class com.mastfrog.util.file.FileUtils
Read a character sequence from a file using default settings and permissive handling of coding errors; the returned character sequence wraps the character buffers decoded to minimize copies.
readCharSequence(Path, int, Charset, boolean) - Static method in class com.mastfrog.util.file.FileUtils
Read a character sequence from a file using default settings and permissive handling of coding errors; the returned character sequence wraps the character buffers decoded to minimize copies.
readCharSequence(Path, Charset) - Static method in class com.mastfrog.util.file.FileUtils
Read a character sequence from a file using default settings and permissive handling of coding errors; the returned character sequence wraps the character buffers decoded to minimize copies.
readResourceAsUTF8(Class<?>, String) - Static method in class com.mastfrog.util.streams.Streams
Read a UTF-8 string from a resource relative to a class file.
readSql(InputStream) - Static method in class com.mastfrog.util.streams.Streams
Reads SQL from an input stream.
readString(InputStream) - Static method in class com.mastfrog.util.streams.Streams
Reads a stream as a string.
readString(InputStream, int) - Static method in class com.mastfrog.util.streams.Streams
Read a string with a fixed buffer size
readString(InputStream, CharSequence) - Static method in class com.mastfrog.util.streams.Streams
Reads a string using a character encoding.
readString(InputStream, String) - Static method in class com.mastfrog.util.streams.Streams
Read a string with a specified charset
readString(InputStream, String, int) - Static method in class com.mastfrog.util.streams.Streams
Read a string with a specified charset and a fixed buffer size
readString(InputStream, Charset) - Static method in class com.mastfrog.util.streams.Streams
Read a string with a specified charset
readString(InputStream, Charset, int) - Static method in class com.mastfrog.util.streams.Streams
Read a string with a specified charset and a fixed buffer size
readString(Reader) - Static method in class com.mastfrog.util.streams.Streams
Reads all input from a reader into a string.
readString(Path, int, Charset) - Static method in class com.mastfrog.util.file.FileUtils
Read a String from a file using default settings and permissive handling of coding errors.
readString(Path, int, Charset, boolean) - Static method in class com.mastfrog.util.file.FileUtils
Read a String from a file using default settings and permissive handling of coding errors.
readString(Path, Charset) - Static method in class com.mastfrog.util.file.FileUtils
Read a String from a file using default settings and permissive handling of coding errors.
readUTF8(Path) - Static method in class com.mastfrog.util.file.FileUtils
Read a UTF-8 character sequence from a file using default settings and permissive handling of coding errors.
readUTF8String(InputStream) - Static method in class com.mastfrog.util.streams.Streams
Read a UTF-8 string from a stream.
readUTF8String(Path) - Static method in class com.mastfrog.util.file.FileUtils
Read a UTF-8 character sequence from a file using default settings and permissive handling of coding errors.
recursiveWatch(Path, int, BiConsumer<Path, WatchEvent.Kind<?>>, WatchEvent.Kind<?>, WatchEvent.Kind<?>...) - Method in class com.mastfrog.util.file.WatchManager
Create a new recursive watcher, already attached.
register(WatchService, WatchEvent.Kind<?>...) - Method in class com.mastfrog.util.path.ComponentUPath
 
register(WatchService, WatchEvent.Kind<?>[], WatchEvent.Modifier...) - Method in class com.mastfrog.util.path.ComponentUPath
 
relativize(Path) - Method in class com.mastfrog.util.path.ComponentUPath
 
relativize(Path) - Method in interface com.mastfrog.util.path.UnixPath
 
remainingData() - Method in class com.mastfrog.util.streams.ContinuousLineStream
In the case that the file did not end with a newline, get the remaining data from it
remove() - Method in class com.mastfrog.util.streams.ContinuousLineStream
Throws a UOE.
reset() - Method in interface com.mastfrog.util.streams.GeneralByteChannel
Reset the channel's position and closed state (if possible); useful for avoiding copies in the case of a channel that is used for writes and then reads.
reset() - Method in class com.mastfrog.util.streams.HashingInputStream
 
resolve(String) - Method in class com.mastfrog.util.path.ComponentUPath
 
resolve(String) - Method in interface com.mastfrog.util.path.UnixPath
 
resolve(Path) - Method in class com.mastfrog.util.path.ComponentUPath
 
resolve(Path) - Method in interface com.mastfrog.util.path.UnixPath
 
resolveSibling(String) - Method in class com.mastfrog.util.path.ComponentUPath
 
resolveSibling(String) - Method in interface com.mastfrog.util.path.UnixPath
 
resolveSibling(Path) - Method in class com.mastfrog.util.path.ComponentUPath
 
resolveSibling(Path) - Method in interface com.mastfrog.util.path.UnixPath
 

S

search(boolean, Path, boolean, Predicate<? super Path>, Consumer<? super Path>) - Static method in class com.mastfrog.util.file.FileUtils
Search the subtree of a directory for paths.
setPermissions(Path, PosixFilePermission...) - Static method in class com.mastfrog.util.file.FileUtils
Convenience varargs version of Files.setPosixFilePermissions without having to either create an EnumSet, or create an intermediate ArrayList in order to do that.
sha1(InputStream) - Static method in class com.mastfrog.util.streams.HashingInputStream
 
sha1(OutputStream) - Static method in class com.mastfrog.util.streams.HashingOutputStream
 
shutdown() - Method in class com.mastfrog.util.file.WatchManager
Shut down this WatchManager, closing all watch keys.
skip(long) - Method in class com.mastfrog.util.streams.ContinuousStringStream
 
startsWith(String) - Method in class com.mastfrog.util.path.ComponentUPath
 
startsWith(Path) - Method in class com.mastfrog.util.path.ComponentUPath
 
streamForURL(URL) - Static method in class com.mastfrog.util.streams.Streams
 
Streams - Class in com.mastfrog.util.streams
Utilities methods for working with input and output streams.
subpath(int, int) - Method in class com.mastfrog.util.path.ComponentUPath
 
subpath(int, int) - Method in interface com.mastfrog.util.path.UnixPath
 
SYSPROP_DEFAULT_BUFFER_SIZE - Static variable in class com.mastfrog.util.file.FileUtils
 

T

tail(Path, Charset) - Static method in class com.mastfrog.util.file.FileUtils
Tail a file, such as a log file.
tail(Path, Charset, int, Executor) - Static method in class com.mastfrog.util.file.FileUtils
Tail a file, such as a log file.
tee(PrintStream...) - Static method in class com.mastfrog.util.streams.Streams
 
teeSystemOut(PrintStream) - Static method in class com.mastfrog.util.streams.Streams
 
temp() - Static method in class com.mastfrog.util.file.FileUtils
Get the system temporary directory.
ThreadMappedStdIO - Class in com.mastfrog.util.streams.stdio
Allows System.out and System.err to be replaced just for a single thread, while leaving them alone for the rest of the system.
toAbsolutePath() - Method in class com.mastfrog.util.path.ComponentUPath
 
toAbsolutePath() - Method in interface com.mastfrog.util.path.UnixPath
 
toFile() - Method in class com.mastfrog.util.path.ComponentUPath
 
toIterable() - Method in class com.mastfrog.util.streams.ContinuousLineStream
Return this as an iterable.
toNativePath() - Method in class com.mastfrog.util.path.ComponentUPath
 
toNativePath() - Method in interface com.mastfrog.util.path.UnixPath
Convert this path to the native equivalent retrieved from Paths.get() (if this involves Windows drive letters, all bets are off).
toRealPath(LinkOption...) - Method in class com.mastfrog.util.path.ComponentUPath
 
toRelativePath() - Method in class com.mastfrog.util.path.ComponentUPath
 
toRelativePath() - Method in interface com.mastfrog.util.path.UnixPath
 
toString() - Method in class com.mastfrog.util.file.WatchManager
 
toString() - Method in class com.mastfrog.util.path.ComponentUPath
 
toString(char) - Method in class com.mastfrog.util.path.ComponentUPath
 
toString(char) - Method in interface com.mastfrog.util.path.UnixPath
 
toUri() - Method in class com.mastfrog.util.path.ComponentUPath
 
truncate(long) - Method in interface com.mastfrog.util.streams.GeneralByteChannel
 

U

UnixPath - Interface in com.mastfrog.util.path
Platform-independent implementation of java.nio.file.Path allowing for consistency across Unix and Windows; useful for doing path transforms and as keys where it is imperative that the path separator be '/' no matter what.
unwatch(Path, BiConsumer<Path, WatchEvent.Kind<?>>) - Method in class com.mastfrog.util.file.WatchManager
Stop watching a file or folder; if the passed consumer is null, this will unwatch for all listeners on the passed file.
unzip(InputStream, Path) - Static method in class com.mastfrog.util.file.FileUtils
Unzip the passed input stream into the passed directory.
userCacheRoot() - Static method in class com.mastfrog.util.file.FileUtils
Get the cache directory in the user's home directory - on linux, ~/.cache, on Mac OS X ~/Library/Caches

V

visitNames(Consumer<String>) - Method in class com.mastfrog.util.path.ComponentUPath
 
visitNames(Consumer<String>) - Method in interface com.mastfrog.util.path.UnixPath
 

W

watch(Path, BiConsumer<Path, WatchEvent.Kind<?>>, WatchEvent.Kind<?>, WatchEvent.Kind<?>...) - Method in class com.mastfrog.util.file.WatchManager
Watch a file or folder; if the passed target is a file, only notifications for that file will be delivered; if a folder, notifications for any file or folder within that directory (folders may notify they were modified when a file is created or changes within them) will be delivered.
watch(Path, BiConsumer<Path, WatchEvent.Kind<?>>, Set<WatchEvent.Kind<?>>) - Method in class com.mastfrog.util.file.WatchManager
Watch a file or folder; if the passed target is a file, only notifications for that file will be delivered; if a folder, notifications for any file or folder within that directory (folders may notify they were modified when a file is created or changes within them) will be delivered.
WatchManager - Class in com.mastfrog.util.file
Manages file system watches, centralizing management of watch keys, and enabling and disabling notifications; uses a single thread and a set of polling intervals, and timeouts to ensure all watches are fairly serviced with fixed overhead.
WatchManager() - Constructor for class com.mastfrog.util.file.WatchManager
 
WatchManager(Duration, Duration, Duration) - Constructor for class com.mastfrog.util.file.WatchManager
 
WatchManager(ScheduledExecutorService, long, long, long) - Constructor for class com.mastfrog.util.file.WatchManager
 
WatchManager(ScheduledExecutorService, Duration, Duration, Duration) - Constructor for class com.mastfrog.util.file.WatchManager
Create a watch manager.
WatchManager.RecursiveWatcher - Interface in com.mastfrog.util.file
Allows for recursive watching on folders and files.
write(int) - Method in class com.mastfrog.util.streams.HashingOutputStream
 
writeAscii(Path, CharSequence) - Static method in class com.mastfrog.util.file.FileUtils
Write a character sequence to a file as ASCII.
writeCharSequence(CharSequence, boolean, Charset, int, boolean, IOSupplier<? extends T>) - Static method in class com.mastfrog.util.file.FileUtils
Write a character sequence to a channel.
writeFile(Path, boolean, CharSequence, boolean, Charset, int, boolean, FileAttribute...) - Static method in class com.mastfrog.util.file.FileUtils
Write a character sequence to a file.
writeFile(Path, boolean, CharSequence, Charset, int, boolean, FileAttribute...) - Static method in class com.mastfrog.util.file.FileUtils
Write a character sequence to a file.
writeFile(Path, CharSequence, Charset) - Static method in class com.mastfrog.util.file.FileUtils
Write a character sequence to a file.
writeFile(Path, CharSequence, Charset, boolean, FileAttribute...) - Static method in class com.mastfrog.util.file.FileUtils
Write a character sequence to a file.
writeFile(Path, CharSequence, Charset, int, boolean) - Static method in class com.mastfrog.util.file.FileUtils
Write a character sequence to a file.
writeFile(Path, CharSequence, Charset, int, boolean, FileAttribute...) - Static method in class com.mastfrog.util.file.FileUtils
Write a character sequence to a file.
writeString(String, File) - Static method in class com.mastfrog.util.streams.Streams
 
writeUtf8(Path, CharSequence) - Static method in class com.mastfrog.util.file.FileUtils
Write a character sequence to a file as UTF-8.
A B C D E F G H I L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values