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 the last modification of the file matches cutoff
favorably.
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 the filename starts with the prefix.
Checks to see if the size of the file is favorable.
Checks to see if the filename ends with the suffix.
Checks to see if the filename matches one of the wildcards.
Checks to see if the File should be accepted by this filter.
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 the filename starts with the prefix.
Checks to see if the filename ends with the suffix.
Checks to see if the filename matches one of the wildcards.
Whether the files accepted will be larger or smaller.
Whether the files accepted will be older or newer.
Adds the specified file filter to the list of file filters at the end of
the list.
Filters files based on a cutoff time, can filter either older or newer files.
Constructs a new age file filter for files older than a certain
cutoff date.
Returns a filter that returns true if the file was last modified after
the specified cutoff date.
Constructs a new age file filter for files on any one side
of a certain cutoff date.
Returns a filter that filters files based on a cutoff date.
Constructs a new age file filter for files older than a certain
File (whose last modification time will be used as reference).
Returns a filter that returns true if the file was last modified after
the specified reference file.
Constructs a new age file filter for files on any one side
of a certain File (whose last modification time will be used as
reference).
Returns a filter that filters files based on a cutoff reference file.
Constructs a new age file filter for files older than a certain cutoff.
Returns a filter that returns true if the file was last modified after
the specified cutoff time.
Constructs a new age file filter for files on any one side
of a certain cutoff.
Returns a filter that filters files based on a cutoff time.
A java.io.FileFilter
providing conditional AND logic across a list of
file filters.
Constructs a new instance of AndFileFilter
.
Constructs a new instance of AndFileFilter
with the specified list of filters.
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.
Checks to see if writing the specified number of bytes would cause the
configured threshold to be exceeded.
A special ObjectInputStream that loads a class based on a specified
ClassLoader
rather than the system default.
Constructs a new ClassLoaderObjectInputStream.
Clean a directory without deleting it.
Clean a directory without deleting it.
Closing a ByteArrayOutputStream has no effect.
Closes underlying output stream, and mark this as closed
Closes stream associated with current thread.
Closes stream associated with current thread.
Closes the underlying Reader
quietly.
Closes this output stream and releases any system resources associated
with this stream.
True when close() has been called successfully.
Unconditionally close an InputStream
.
Closes the iterator, handling null and ignoring exceptions.
Unconditionally close an OutputStream
.
Unconditionally close an Reader
.
Unconditionally close a Writer
.
Concatenates a filename to a base path using normal command line style rules.
Defines operations for conditional file filters.
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.
Compare the contents of two Readers 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 bytes from an InputStream
to an
OutputStream
.
Copy and convert bytes from an InputStream
to chars on a
Writer
.
Copy bytes from an InputStream
to chars on a
Writer
using the default character encoding of the platform.
Copy and convert bytes from an InputStream
to chars on a
Writer
, using the specified encoding.
Copy bytes from an InputStream
to chars on a
Writer
using the specified character encoding.
Serialize chars from a Reader
to bytes on an
OutputStream
, and flush the OutputStream
.
Copy chars from a Reader
to bytes on an
OutputStream
using the default character encoding of the
platform, and calling flush.
Copy chars from a Reader
to bytes on an
OutputStream
using the specified character encoding, and
calling flush.
Copy chars from a Reader
to a Writer
.
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
.
Copies a whole directory to a new location preserving the file dates.
Copies a whole directory to a new location.
Copies a directory to within another directory preserving the file dates.
Copies a file to a new location preserving the file date.
Copies a file to a new location.
Copies a file to a directory preserving the file date.
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.
The count of bytes that have passed.
A decorating input stream that counts the number of bytes that
have passed through so far.
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.
The cutoff time threshold.
The default size of the buffer.
The default buffer size to use.
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.
The system directory separator character.
The Unix directory separator character.
The Windows directory separator character.
This filter accepts File
s that are directories.
Returns a filter that checks if the file is a directory.
Internal copy directory method.
Internal copy file method.
Does the work of getting the path.
Does the work of getting the path.
Internal method to perform the normalization.
Dump a byte value into a StringBuffer.
Dump an array of bytes to an OutputStream.
Dump a long value into a StringBuffer.
An empty array of type File
.
Utility code for dealing with different endian systems.
Instances should NOT be constructed in standard programming.
EOL - static field in class org.apache.commons.io.
HexDump The line-separator (initializes to "line.separator" system property.
Checks whether two filenames are equal exactly.
Checks whether two filenames are equal after both have been normalized
and optionally using the case rules of the system.
Checks whether two filenames are equal after both have been normalized.
Checks whether two filenames are equal after both have been normalized
and using the case rules of the system.
Checks whether two filenames are equal using the case rules of the system.
The extension separator character.
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.
The list of file filters.
The list of file filters.
Useful utilities for working with file filters.
FileFilterUtils is not normally instantiated.
General filename and filepath manipulation utilities.
Instances should NOT be constructed in standard programming.
General File System utilities.
Instances should NOT be constructed in standard programming.
General file manipulation utilities.
Instances should NOT be constructed in standard programming.
A flag indicating if the iterator has been fully read.
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.
Make a directory, including any necessary but nonexistent parent
directories.
Returns the free space on a drive or volume by invoking
the command line.
Returns the free space on a drive or volume in kilobytes by invoking
the command line.
Returns the free space on a drive or volume in a cross-platform manner.
Find free space on the *nix platform using the 'df' command.
Find free space on the Windows platform using the 'dir' command.
Gets the base name, minus the full path and extension, from a full filename.
Return the appropriate byte[]
buffer
specified by index.
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.
Gets the extension of a filename.
Returns the same output file specified in the constructor, even when
threashold has not been reached.
Returns this conditional file filter's list of file filters.
Gets the full path from a full filename, which is the prefix + path.
Gets the full path from a full filename, which is the prefix + path,
and also excluding the final directory separator.
Gets the name minus the path from a full filename.
Gets the path from a full filename, which excludes the prefix.
Gets the path from a full filename, which excludes the prefix, and
also excluding the final directory separator.
Gets the prefix from a full filename, such as C:/
or ~/
.
Returns the length of the filename prefix, such as C:/
or ~/
.
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.
Returns the index of the last extension separator character, which is a dot.
Returns the index of the last directory separator character.
Operating system state flag for error.
Initialise the wrapped file writer.
Finds files within a given directory (and optionally its
subdirectories).
Singleton instance of directory filter
Singleton instance of false filter
Singleton instance, used mainly for testing.
Singleton instance of true filter
An interface which brings the FileFilter and FilenameFilter
interfaces together.
General IO stream manipulation utilities.
Instances should NOT be constructed in standard programming.
Checks whether the extension of the filename is one of those specified.
Checks whether the extension of the filename is that specified.
Checks whether the extension of the filename is one of those specified.
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.
Checks if the character is a separator.
Determines whether or not the configured threshold has been exceeded for
this output stream.
Overridable method to validate each line that is returned.
Allows iteration over the files in given directory (and optionally
its subdirectories).
Allows iteration over the files in a given directory (and optionally
its subdirectories) which match an array of extensions.
The extension for the lock file.
The system line separator string.
The Unix line separator string.
The Windows line separator string.
An Iterator over the lines in a Reader
.
Return an Iterator for the lines in a File
.
Return an Iterator for the lines in an InputStream
, using
the character encoding specified (or default encoding if null).
Return an Iterator for the lines in a Reader
.
Constructs an iterator of the lines for a Reader
.
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 with a file encoding.
Constructs a LockableFileWriter with a file encoding.
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
Makes a new buffer available either by allocating
a new one or re-cycling an existing one.
Returns the next line in the wrapped Reader
.
Returns the next line in the wrapped Reader
.
Normalizes a path, removing double and single dot path steps.
Normalizes a path, removing double and single dot path steps,
and removing any final directory separator.
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.
Opens the stream to be operating system.
A java.io.FileFilter
providing conditional OR logic across a list of
file filters.
Constructs a new instance of OrFileFilter
.
Constructs a new instance of OrFileFilter
with the specified filters.
Returns a filter that ORs the two specified filters.
Constructs a new file filter that ORs the result of two other filters.
This package defines utility classes for working with streams, readers,
writers and files.
This package defines an interface (IOFileFilter) that combines both
java.io.FileFilter
and java.io.FilenameFilter
.
This package provides implementations of input classes, such as
InputStream
and Reader
.
This package provides implementations of output classes, such as
OutputStream
and Writer
.
The operating system flag.
Operating system state flag for neither Unix nor Windows.
The separator character that is the opposite of the system separator.
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 if a byte is successfully read.
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 next byte from the input stream.
Reads the contents of a file into a byte array.
Reads the contents of a file into a String.
Reads the contents of a file line by line to a List of Strings.
Get the contents of an InputStream
as a list of Strings,
one entry per line, using the default character encoding of the platform.
Get the contents of an InputStream
as a list of Strings,
one entry per line, using the specified character encoding.
Get the contents of a Reader
as a list of Strings,
one entry per line.
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.
Removes the extension from a filename.
Removes the specified file filter.
Resolve a class specified by the descriptor using the
specified ClassLoader or the super ClassLoader.
Converts all separators to the system separator.
Converts all separators to the Unix separator of forward slash.
Converts all separators to the Windows separator of backslash.
Sets the list of file filters, replacing any previously configured
file filters on this filter.
Filters files based on size, can filter either larger or smaller files
as compared to a given threshold.
Returns a filter that returns true if the file is bigger than a certain size.
Constructs a new size file filter for files larger than a certain size.
Returns a filter that filters based on file size.
Constructs a new size file filter for files based on a certain size
threshold.
Recursively count size of a directory (sum of the length of all files).
Increases the count by the number of skipped bytes.
Splits a string into a number of tokens.
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.
The system separator character.
Classic splitter of OutputStream.
Constructs a TeeOutputStream.
Tests that we can write to the lock directory.
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[]
using the default character encoding of the platform.
Get the contents of a Reader
as a byte[]
using the specified character encoding.
Get the contents of a String
as a byte[]
using the default character encoding of the platform.
Get the contents of an InputStream
as a character array
using the default character encoding of the platform.
Get the contents of an InputStream
as a character array
using the specified character encoding.
Get the contents of a Reader
as a character array.
Convert from a URL
to a File
.
Converts each of an array of URL
to a File
.
Convert the specified string to an input stream, encoded as bytes
using the default character encoding of the platform.
Convert the specified string to an input stream, encoded as bytes
using the specified character encoding.
Get the contents of a byte[]
as a String
using the default character encoding of the platform.
Get the contents of a byte[]
as a String
using the specified character encoding.
Get the contents of an InputStream
as a String
using the default character encoding of the platform.
Get the contents of an InputStream
as a String
using the specified character encoding.
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.
Converts each of an array of File
to a URL
.
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.
Filters files using supplied wildcard(s).
Construct a new wildcard filter for a list of wildcards
Construct a new wildcard filter for a single wildcard
Construct a new wildcard filter for an array of wildcards
Checks a filename to see if it matches the specified wildcard matcher,
always testing case-sensitive.
Checks a filename to see if it matches the specified wildcard matcher.
Checks a filename to see if it matches the specified wildcard matcher
using the case rules of the system.
The wildcards that will be used to match filenames
Operating system state flag for Windows.
The Windows separator character.
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.
Writes bytes from a byte[]
to an OutputStream
.
Writes bytes from a byte[]
to chars on a Writer
using the default character encoding of the platform.
Writes bytes from a byte[]
to chars on a Writer
using the specified character encoding.
Writes chars from a char[]
to bytes on an
OutputStream
.
Writes chars from a char[]
to bytes on an
OutputStream
using the specified character encoding.
Writes chars from a char[]
to a Writer
using the default character encoding of the platform.
Calls the write(byte[]) method.
Writes byte to stream associated with current thread.
Writes the specified byte to this output stream.
Writes chars from a String
to bytes on an
OutputStream
using the default character encoding of the
platform.
Writes chars from a String
to bytes on an
OutputStream
using the specified character encoding.
Writes chars from a String
to a Writer
.
Writes chars from a StringBuffer
to bytes on an
OutputStream
using the default character encoding of the
platform.
Writes chars from a StringBuffer
to bytes on an
OutputStream
using the specified character encoding.
Writes chars from a StringBuffer
to a Writer
.
Writes a byte array to a file creating the file if it does not exist.
Writes the toString()
value of each item in a collection to
an OutputStream
line by line, using the default character
encoding of the platform and the specified line ending.
Writes the toString()
value of each item in a collection to
an OutputStream
line by line, using the specified character
encoding and the specified line ending.
Writes the toString()
value of each item in a collection to
a Writer
line by line, using the specified line ending.
Writes the toString()
value of each item in a collection to
the specified File
line by line.
Writes the toString()
value of each item in a collection to
the specified File
line by line.
Writes a String to a file creating the file if it does not exist.
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.
Writes the data from this output stream to the specified output stream,
after it has been closed.
The number of bytes written to the output stream.