FileProcessor
which processes files by feeding their contents either to the archiveContentsProcessor
, the compressedContentsProcessor or the normalContentsProcessor.ArchiveFormat
s.CompressUtil.ArchiveHandler
which processes ArchiveInputStream
s by feeding their
entries into the contentsProcessor.CompressUtil.ArchiveHandler
which transforms ArchiveInputStream
s into ArchiveOutputStream
s, honoring the given archiveEntryRemoval, archiveEntryRenaming and
archiveFileCombiner, and using the given contentsTransformer.ArchiveInputStream
.URLStreamHandler
which makes the implementation of archive-based URLStreamHandler
s
simple.InputStream
that reads from the delegate and through the
transformerOutputStream
that writes through the transformer and to the
delegate.File.delete()
, but clears and deletes directory trees recursively.ContentsTransformer
s that "chains" the two delegates.ContentsTransformer.transform(String, InputStream, java.io.OutputStream)
for all archive entries into one object.ContentsProcessor
which processes contents by feeding it to the normalContentsProcessor
, but automagically detects various archive and compression formats and processes the
entries of the archive and the uncompressed contents instead of the "raw" contents.ContentsTransformer
which transforms contents by feeding it through the normalContentsTransformer
, but automagically detects various archive and compression formats and processes the
entries of the archive and the uncompressed contents instead of the "raw" contents.FileTransformer
which transforms files by feeding their contents through the normalContentsTransformer
(just like the FileContentsTransformer
), or, iff the file is an archive
file, by feeding the archive file's entries through the archiveEntryContentsTransformer, or, iff the
file is a compressed file, be feeding the compressed file's decompressed contents through the compressedContentsTransformer
.CompressionFormat
s.URLStreamHandler
which makes the implementation of archive-based URLStreamHandler
s
simple.CompressUtil.CompressorHandler
which processes an ArchiveInputStream
by feeding its
entries to the given contentsProcessor.CompressUtil.CompressorHandler
which transforms an ArchiveInputStream
into an OutputStream
, using the given contentsTransformer.CompressorInputStream
.org.apache.commons.compress
.ContentsProcessor
-related utility methods.ContentsProcessor.process(String, InputStream, long, long, ProducerWhichThrows)
for all archive entries into one object.ContentsProcessor
that is used to process a file's contents when FileContentsProcessor.process(String, File)
is
invoked.ContentsTransformer
.InputStream
and writes bytes to an
OutputStream
.ContentsTransformer
which IoUtil.copy(InputStream, OutputStream)
s all data unmodified and
returns the number of copied bytes.SelectiveContentsTransformer.SelectiveContentsTransformer(Predicate, ContentsTransformer,
ContentsTransformer)
, but conducts certain optimizations.InputStream
.InputStream
and writing to an OutputStream
.ArchiveStreamFactory
, with several
improvements.org.apache.commons.compress.archivers.ar
package.org.apache.commons.compress.archivers.arj
package.org.apache.commons.compress.archivers.cpio
package.org.apache.commons.compress.archivers.dump
package.org.apache.commons.compress.archivers.jar
package.org.apache.commons.compress.archivers.sevenz
package.org.apache.commons.compress.archivers.tar
package.org.apache.commons.compress.archivers.zip
package.CompressorStreamFactory
, with several
improvements.org.apache.commons.compress.compressors.bzip2
package.org.apache.commons.compress.compressors.gzip
package.org.apache.commons.compress.compressors.lzma
package.org.apache.commons.compress.compressors.pack200
package.org.apache.commons.compress.compressors.snappy
package.org.apache.commons.compress.compressors.xz
package.org.apache.commons.compress.compressors.z
package.FileProcessor
which processes directories and regular files.FileProcessor
which processes directories and regular files exactly like the FileProcessor
returned by FileProcessings.directoryProcessor(Predicate, FileProcessor, Comparator, FileProcessor,
DirectoryCombiner, SquadExecutor, ExceptionHandler)
, except that it processes directory members
recursively.DirectoryTransformer
which implements the following features:
Recursive processing of directories
Removal, renaming and addition of directory members
FileAdder
-related utility methods.ContentsProcessor
, and eventually closing
the file.FileTransformer
that transforms a file be feeding its contents through a ContentsTransformer
.File
.FileTransformer
-related utility methods.ArchiveOutputStream.getFormat()
CompressorOutputStream.getFormat()
ArchiveFormatFactory
.ArchiveFormatFactory
.ArchiveFormatFactory
.ArchiveFormatFactory
.ArchiveFormatFactory
.ArchiveFormatFactory
.ArchiveFormatFactory
.ArchiveFormatFactory
.CompressionFormatFactory
.CompressionFormatFactory
.CompressionFormatFactory
.CompressionFormatFactory
.CompressionFormatFactory
.CompressionFormatFactory
.CompressionFormatFactory
.CompressionFormatFactory
.ArchiveEntry.getCrc32()
CompressorInputStream.getUncompressedSize()
URLStreamHandler
for the protocol "ar
".URLStreamHandler
for the protocol "arj
".URLStreamHandler
for the protocol "cpio
".URLStreamHandler
for the protocol "dump
".URLStreamHandler
for the protocol "jar
".URLStreamHandler
for the protocol "tar
".URLStreamHandler
for the protocol "zip
".URLStreamHandler
for the protocol "bzip2
".URLStreamHandler
for the protocol "gzip
".URLStreamHandler
for the protocol "lzma
".URLStreamHandler
for the protocol "pack200
".URLStreamHandler
for the protocol "snappy
".URLStreamHandler
for the protocol "xz
".URLStreamHandler
for the protocol "z
".FileTransformations.ArchiveCombiner
that does nothing.FileTransformations.DirectoryCombiner
that does nothing.FileProcessings.DirectoryCombiner
which ignores the combinables and returns null
.TransformerWhichThrows
which processes an InputStream
by feeding it into
the given contentsProcessor.InputStream
into an OutputStream
using the
given contentsTransformer.ArchiveEntry.getName()
such that
The names of two entries in two archives are typically regarded as equal by users
The name never ands with a slash ('/')
This is necessary because e.g. for the ZIP-derived archive formats the names of DIRECTORY entries always have
a trailing slash, which is not the case for other archive formats.transform
(String, File, File,
FileTransformer.Mode.CHECK
)
; indicates that when that method would be invoked with mode FileTransformer.Mode.TRANSFORM
, its output would not be identical with its input.ArchiveInputStream
reading from the archiveFile.ArchiveInputStream
.CompressorInputStream
reading from the compressedFile.true
for the path, then the
trueDelegate is called, otherwise the falseDelegate.ContentsProcessor.process(String, InputStream,
long, long, ProducerWhichThrows)
, then closes the file.ProxyFileTransformer.set(FileTransformer)
.ContentsProcessor
which processes a stream by feeding it into the normalContentsProcessor
, but automagically detects various archive formats and compression formats (also
nested) and processes the entries of the archive and the uncompressed contents instead of the
"raw" contents.ContentsTransformer
which transforms a stream by feeding it through the delegate,
but automagically detects various archive formats and compression formats (also nested) and processes the
entries of the archive and the uncompressed contents instead of the "raw" contents.FileProcessor
which processes files by feeding their contents through the delegate
(just like the FileContentsProcessor
), but automagically detects various archive and compression formats
(also nested) and processes the entries of the archive and the uncompressed contents instead of
the "raw" contents.FileTransformer
which transforms files by feeding their contents through the
delegate (just like the FileContentsTransformer
), but automagically detects various archive
and compression formats (also nested) and processes the entries of the archive and the uncompressed
contents instead of the "raw" contents.FileTransformer
which handles removal and renaming of files.ContentsTransformer
that delegates contents transformation to one of two delegates, depending on whether
the path argument matches a string Predicate
or not.FileTransformer
that feeds the file to the trueDelegate iff the path matches a given
Predicate
, and otherwise to the falseDelegate.ContentsTransformer
, but operates on Reader
s and Writer
s instead of
InputStream
s and OutputStream
s.Runnable
that simply throws FileTransformer.NOT_IDENTICAL
.directoryMemberTransformer
.transform()
is called for each member of
in.ContentsTransformer
, and writes it to the out file.archiveOutputStream
.Copyright © 2018 Arno Unkrig. All rights reserved.