An abstract class which implements the Java FileFilter and FilenameFilter
interfaces via the IOFileFilter interface.
Checks to see if the File should be accepted by this filter.
Checks to see if both filters are true.
Checks to see if the file is a directory.
Checks to see if the File should be accepted by this filter.
Checks to see if the filename matches.
Checks to see if both filters are true.
Checks to see if either filter is true.
Checks to see if the filename starts with the prefix.
Checks to see if the filename ends with the suffix.
Checks to see if the File should be accepted by this filter.
Checks to see if both filters are true.
Checks to see if the File should be accepted by this filter.
Checks to see if the filename matches.
Checks to see if both filters are true.
Checks to see if either filter is true.
Checks to see if the filename starts with the prefix.
Checks to see if the filename ends with the suffix.
This filter produces a logical AND of the two filters specified.
Constructs a new file filter that ANDs the result of two other filters.
Returns a filter that ANDs the two specified filters.
Returns an IOFileFilter
that wraps the
FileFilter
instance.
Returns an IOFileFilter
that wraps the
FilenameFilter
instance.
Bind the specified stream to the current thread.
Bind the specified stream to the current thread.
the second OutputStream to write to
This class implements an output stream in which the data is
written into a byte array.
Creates a new byte array output stream.
Creates a new byte array output stream, with a buffer capacity of
the specified size, in bytes.
Returns a human-readable version of the file size (original is in
bytes).
Checks to see if writing the specified number of bytes would cause the
configured threshold to be exceeded.
Clean a directory without deleting it.
Clean a directory without deleting it.
Closing a ByteArrayOutputStream has no effect.
Closes stream associated with current thread.
Closes stream associated with current thread.
Closes this output stream and releases any system resources associated
with this stream.
Unconditionally close an InputStream
.
Unconditionally close an OutputStream
.
Unconditionally close an Reader
.
Unconditionally close an Writer
.
Compare the contents of two files to determine if they are equal or not.
Compare the contents of two Streams to determine if they are equal or not.
Converts a Collection containing java.io.File instanced into array
representation.
Copy bytes from a byte[]
to an OutputStream
.
Copy and convert bytes from a byte[]
to chars on a
Writer
.
Copy and convert bytes from a byte[]
to chars on a
Writer
, using the specified encoding.
Copy bytes from an InputStream
to an OutputStream
.
Copy and convert bytes from an InputStream
to chars on a
Writer
.
Copy and convert bytes from an InputStream
to chars on a
Writer
, using the specified encoding.
Serialize chars from a Reader
to bytes on an
OutputStream
, and flush the OutputStream
.
Copy chars from a Reader
to a Writer
.
Serialize chars from a String
to bytes on an OutputStream
, and
flush the OutputStream
.
Copy chars from a String
to a Writer
.
Copy file from source to destination.
Copy file from source to destination.
Copy file from source to destination.
Copies bytes from the URL source
to a file destination
.
This class provides static utility methods for buffered
copying between sources (InputStream
, Reader
, String
and
byte[]
) and destinations (OutputStream
, Writer
,
String
and byte[]
).
Instances should NOT be constructed in standard programming.
Used in debugging, it counts the number of bytes that pass
through it.
Constructs a new CountingInputStream.
Used in debugging, it counts the number of bytes that pass
through it.
Constructs a CountingOutputStream.
The output stream to which data will be written at any given time.
An output stream which will retain data in memory until a specified
threshold is reached, and only then commit it to disk.
Constructs an instance of this class which will trigger an event at the
specified threshold, and save data to a file beyond that point.
This class turns a Java FileFilter or FilenameFilter into an IO FileFilter.
Constructs a delegate file filter around an existing FileFilter.
Constructs a delegate file filter around an existing FilenameFilter.
Deletes the file associated with this tracker instance.
Recursively delete a directory.
Recursively schedule directory for deletion on JVM exit.
Data written to this stream is forwarded to a stream that has been associated
with this thread.
Data written to this stream is forwarded to a stream that has been associated
with this thread.
This filter accepts File
s that are directories.
Returns a filter that checks if the file is a directory.
The output stream to which data will be written after the theshold is
reached.
dump an array of bytes to an OutputStream
A file filter that always returns false.
Returns a filter that always returns false.
Keeps track of files awaiting deletion, and deletes them when an associated
marker object is reclaimed by the garbage collector.
Useful utilities for working with file filters.
FileFilterUtils is not normally instantiated.
This class provides basic facilities for manipulating files and file paths.
Instances should NOT be constructed in standard programming.
Flushes stream associated with current thread.
Flushes this output stream and forces any buffered output bytes to be
written out.
Schedule a file to be deleted when JVM exits.
Returns the number of bytes that have been written to this output stream.
The number of bytes that have passed through this stream.
The number of bytes that have passed through this stream.
Returns the data for this output stream as an array of bytes, assuming
that the data has been retained in memory.
Returns the data for this output stream as a File
, assuming
that the data was written to disk.
Returns the current output stream.
Utility method to retrieve stream bound to current thread (if any).
Utility method to retrieve stream bound to current thread (if any).
Returns the underlying output stream, to which the corresponding
OutputStream
methods in this class will ultimately delegate.
Returns the threshold, in bytes, at which an event will be triggered.
Retrieve the number of files currently being tracked, and therefore
awaiting deletion.
Singleton instance of directory filter
Singleton instance of false filter
Singleton instance of true filter
An interface which brings the FileFilter and FilenameFilter
interfaces together.
General IO Stream manipulation.
Instances should NOT be constructed in standard programming.
Tests if the specified File
is newer than the specified
Date
Tests if the specified File
is newer than the reference
File
.
Tests if the specified File
is newer than the specified
time reference.
Determines whether or not the data for this output stream has been
retained in memory.
Determines whether or not the configured threshold has been exceeded for
this output stream.
Finds files within a given directory (and optionally its
subdirectories).
Finds files within a given directory (and optionally its subdirectories)
which match an array of extensions.
FileWriter that will create and honor lock files to allow simple
cross thread file lock handling.
Constructs a LockableFileWriter.
Constructs a LockableFileWriter.
Constructs a LockableFileWriter.
Constructs a LockableFileWriter.
Constructs a LockableFileWriter.
Constructs a LockableFileWriter.
Filters filenames for a certain name.
Constructs a new name file filter for a list of names.
Returns a filter that returns true if the filename matches the specified text.
Constructs a new name file filter for a single name.
Constructs a new name file filter for any of an array of names.
The filenames to search for
This filter produces a logical NOT of the filters specified.
Returns a filter that NOTs the specified filter.
Constructs a new file filter that NOTs the result of another filters.
This OutputStream writes all data to the famous /dev/null.
The number of bytes in a gigabyte.
The number of bytes in a kilobyte.
The number of bytes in a megabyte.
This filter produces a logical OR of the two filters specified.
Returns a filter that ORs the two specified filters.
Constructs a new file filter that ORs the result of two other filters.
Utility code for IO operations.
This package defines an interface (IOFileFilter) that combines both
java.io.FileFilter
and java.io.FilenameFilter
.
Implementations of input classes, such as
InputStream
and
Reader
.
Implementations of output classes, such as
OutputStream
and
Writer
.
The file to which output will be directed if the threshold is exceeded.
The full path to the file being tracked.
The filename prefixes to search for
Filters filenames for a certain prefix.
Constructs a new Prefix file filter for a list of prefixes.
Returns a filter that returns true if the filename starts with the specified text.
Constructs a new Prefix file filter for a single prefix.
Constructs a new Prefix file filter for any of an array of prefixes.
A Proxy stream which acts as expected, that is it passes the method
calls on to the proxied stream and doesn't change which methods are
being called.
Constructs a new ProxyInputStream.
A Proxy stream which acts as expected, that is it passes the method
calls on to the proxied stream and doesn't change which methods are
being called.
Constructs a new ProxyOutputStream.
A Proxy stream which acts as expected, that is it passes the method
calls on to the proxied stream and doesn't change which methods are
being called.
Constructs a new ProxyReader.
A Proxy stream which acts as expected, that is it passes the method
calls on to the proxied stream and doesn't change which methods are
being called.
Constructs a new ProxyWriter.
Increases the count by 1.
Read byte from stream associated with current thread.
Increases the count by super.read(b)'s return count
Increases the count by super.read(b, off, len)'s return count
Reads the contents of a file into a String.
Reads a "double" value from a byte array at a given offset.
Reads a "double" value from an InputStream.
Reads a "float" value from a byte array at a given offset.
Reads a "float" value from an InputStream.
Reads a "int" value from a byte array at a given offset.
Reads a "int" value from an InputStream.
Reads a "long" value from a byte array at a given offset.
Reads a "long" value from an InputStream.
Reads a "short" value from a byte array at a given offset.
Reads a "short" value from an InputStream.
Reads an unsigned integer (32-bit) value from a byte array at a given
offset.
Reads a unsigned integer (32-bit) from an InputStream.
Reads an unsigned short (16-bit) value from a byte array at a given
offset.
Reads a unsigned short (16-bit) from an InputStream.
The thread that will clean up registered files.
Recursively count size of a directory (sum of the length of all files).
The filename suffixes to search for
Filters files based on the suffix (what the filename ends with).
Constructs a new Suffix file filter for a list of suffixes.
Returns a filter that returns true if the filename ends with the specified text.
Constructs a new Suffix file filter for a single extension.
Constructs a new Suffix file filter for an array of suffixs.
Converts a "double" value between endian systems.
Converts a "float" value between endian systems.
Converts a "int" value between endian systems.
Converts a "long" value between endian systems.
DataInput for systems relying on little endian data formats.
Constructs a SwappedDataInputStream.
Converts a "short" value between endian systems.
Classic splitter of OutputStream.
Constructs a TeeOutputStream.
The threshold at which the event will be triggered.
Whether or not the configured threshold has been exceeded.
An output stream which triggers an event when a specified number of bytes of
data have been written to it.
Constructs an instance of this class which will trigger an event at the
specified threshold.
Switches the underlying output stream from a memory based stream to one
that is backed by disk.
Indicates that the configured threshold has been reached, and that a
subclass should take whatever action necessary on this event.
Get the contents of an InputStream
as a byte[]
.
Get the contents of a Reader
as a byte[]
.
Get the contents of a String
as a byte[]
.
Convert from a URL
to a File
.
Get the contents of a byte[]
as a String.
Get the contents of a byte[]
as a String.
Get the contents of an InputStream
as a String.
Get the contents of an InputStream
as a String.
Get the contents of a Reader
as a String.
Converts an array of file extensions to suffixes for use
with IOFileFilters.
Implements the same behaviour as the "touch" utility on Unix.
Convert the array of Files into a list of URLs.
Track the specified file, using the provided marker, deleting the file
when the marker instance is garbage collected.
Track the specified file, using the provided marker, deleting the file
when the marker instance is garbage collected.
Inner class which acts as the reference for a file pending deletion.
Constructs an instance of this class from the supplied parameters.
Constructs an instance of this class from the supplied parameters.
Collection of Tracker
instances in existence.
A file filter that always returns true.
Returns a filter that always returns true.
Waits for NFS to propagate a file creation, imposing a timeout.
Writes b.length
bytes from the specified byte array to this
output stream.
Writes len
bytes from the specified byte array starting at
offset off
to this output stream.
Calls the write(byte[]) method.
Writes byte to stream associated with current thread.
Writes the specified byte to this output stream.
Writes a "double" value to a byte array at a given offset.
Writes a "double" value to an OutputStream.
Writes a "float" value to a byte array at a given offset.
Writes a "float" value to an OutputStream.
Writes a "int" value to a byte array at a given offset.
Writes a "int" value to an OutputStream.
Writes a "long" value to a byte array at a given offset.
Writes a "long" value to an OutputStream.
Writes a "short" value to a byte array at a given offset.
Writes a "short" value to an OutputStream.
The number of bytes written to the output stream.