public interface IHDF5ArchiveReader extends IHDF5ArchiveInfoProvider
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this object and the file referenced by this object.
|
IHDF5ArchiveReader |
extractFile(java.lang.String path,
java.io.OutputStream out)
Extract the content of a file in the archive to an
OutputStream . |
byte[] |
extractFileAsByteArray(java.lang.String path)
Extract the content of a file in the archive to a byte array.
|
ch.systemsx.cisd.base.io.IInputStream |
extractFileAsIInputStream(java.lang.String path)
Extract the content of a file in the archive as an
IInputStream . |
java.io.InputStream |
extractFileAsInputStream(java.lang.String path)
Extract the content of a file in the archive as an
InputStream . |
IHDF5ArchiveReader |
extractToFilesystem(java.io.File rootDirectory)
Extracts the complete archive to the file system.
|
IHDF5ArchiveReader |
extractToFilesystem(java.io.File rootDirectory,
java.lang.String path)
Extracts a path from the archive to the file system.
|
IHDF5ArchiveReader |
extractToFilesystem(java.io.File rootDirectory,
java.lang.String path,
ArchivingStrategy strategy,
IArchiveEntryVisitor visitorOrNull)
Extracts a path from the archive to the file system.
|
IHDF5ArchiveReader |
extractToFilesystem(java.io.File rootDirectory,
java.lang.String path,
IArchiveEntryVisitor visitorOrNull)
Extracts a path from the archive to the file system.
|
IHDF5ArchiveReader |
extractToFilesystemBelowDirectory(java.io.File rootDirectory,
java.lang.String rootInArchive)
Extracts all paths below a given directory path from the archive to the file system.
|
IHDF5ArchiveReader |
extractToFilesystemBelowDirectory(java.io.File rootDirectory,
java.lang.String rootInArchive,
ArchivingStrategy strategy,
IArchiveEntryVisitor visitorOrNull)
Extracts all paths below a given directory path from the archive to the file system.
|
IHDF5ArchiveReader |
extractToFilesystemBelowDirectory(java.io.File rootDirectory,
java.lang.String rootInArchive,
IArchiveEntryVisitor visitorOrNull)
Extracts all paths below a given directory path from the archive to the file system.
|
IHDF5ArchiveReader |
extractToFilesystemBelowDirectory(java.io.File rootDirectory,
java.lang.String rootInArchive,
java.lang.String path,
ArchivingStrategy strategy,
IArchiveEntryVisitor visitorOrNull)
Extracts a path from the archive below a given directory path to the file system.
|
boolean |
isClosed()
Returns
true if this archive reader has been already closed. |
java.util.List<ArchiveEntry> |
verifyAgainstFilesystem(java.io.File rootDirectoryOnFS)
Verifies the content of the complete archive against the filesystem.
|
java.util.List<ArchiveEntry> |
verifyAgainstFilesystem(java.io.File rootDirectoryOnFS,
VerifyParameters params)
Verifies the content of the complete archive against the filesystem.
|
java.util.List<ArchiveEntry> |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS)
Verifies the content of the archive against the filesystem.
|
IHDF5ArchiveReader |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS,
IArchiveEntryVisitor visitor)
Verifies the content of the complete archive against the filesystem.
|
IHDF5ArchiveReader |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS,
IArchiveEntryVisitor visitor,
IArchiveEntryVisitor missingArchiveEntryVisitor)
Verifies the content of the complete archive against the filesystem.
|
IHDF5ArchiveReader |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS,
IArchiveEntryVisitor visitor,
IArchiveEntryVisitor missingArchiveEntryVisitor,
VerifyParameters params)
Verifies the content of the complete archive against the filesystem.
|
IHDF5ArchiveReader |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS,
IArchiveEntryVisitor visitor,
VerifyParameters params)
Verifies the content of the complete archive against the filesystem.
|
java.util.List<ArchiveEntry> |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS,
java.lang.String rootDirectoryInArchive)
Verifies the content of the archive against the filesystem.
|
IHDF5ArchiveReader |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS,
java.lang.String rootDirectoryInArchive,
IArchiveEntryVisitor visitor,
IArchiveEntryVisitor missingArchiveEntryVisitor,
VerifyParameters params)
Verifies the content of the archive against the filesystem.
|
IHDF5ArchiveReader |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS,
java.lang.String rootDirectoryInArchive,
IArchiveEntryVisitor visitor,
VerifyParameters params)
Verifies the content of the archive against the filesystem.
|
java.util.List<ArchiveEntry> |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS,
java.lang.String rootDirectoryInArchive,
VerifyParameters params)
Verifies the content of the archive against the filesystem.
|
java.util.List<ArchiveEntry> |
verifyAgainstFilesystem(java.lang.String fileOrDir,
java.io.File rootDirectoryOnFS,
VerifyParameters params)
Verifies the content of the archive against the filesystem.
|
exists, isDirectory, isRegularFile, isSymLink, list, list, list, list, list, test, tryGetEntry, tryGetResolvedEntry, tryResolveLink
void close()
boolean isClosed()
true
if this archive reader has been already closed.IHDF5ArchiveReader verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS, java.lang.String rootDirectoryInArchive, IArchiveEntryVisitor visitor, IArchiveEntryVisitor missingArchiveEntryVisitor, VerifyParameters params)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.rootDirectoryInArchive
- The root directory in the archive to start verify from. It will
be stripped from each entry before rootDirectoryOnFS is added.visitor
- The entry visitor to call for each entry. Call ArchiveEntry.isOK()
to
check whether verification was successful.missingArchiveEntryVisitor
- The entry visitor to call for each file that exists on the
filesystem, but is missing in the archive.params
- The parameters to determine behavior of the verification process.IHDF5ArchiveReader verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS, java.lang.String rootDirectoryInArchive, IArchiveEntryVisitor visitor, VerifyParameters params)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.rootDirectoryInArchive
- The root directory in the archive to start verify from. It will
be stripped from each entry before rootDirectoryOnFS is added.visitor
- The entry visitor to call for each entry. Call ArchiveEntry.isOK()
to
check whether verification was successful.params
- The parameters to determine behavior of the verification process.IHDF5ArchiveReader verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS, IArchiveEntryVisitor visitor, IArchiveEntryVisitor missingArchiveEntryVisitor, VerifyParameters params)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.visitor
- The entry visitor to call for each entry. Call ArchiveEntry.isOK()
to
check whether verification was successful.missingArchiveEntryVisitor
- The entry visitor to call for each file that exists on the
filesystem, but is missing in the archive.params
- The parameters to determine behavior of the verification process.IHDF5ArchiveReader verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS, IArchiveEntryVisitor visitor, VerifyParameters params)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.visitor
- The entry visitor to call for each entry. Call ArchiveEntry.isOK()
to
check whether verification was successful.params
- The parameters to determine behavior of the verification process.IHDF5ArchiveReader verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS, IArchiveEntryVisitor visitor, IArchiveEntryVisitor missingArchiveEntryVisitor)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.visitor
- The entry visitor to call for each entry. Call ArchiveEntry.isOK()
to
check whether verification was successful.missingArchiveEntryVisitor
- The entry visitor to call for each file that exists on the
filesystem, but is missing in the archive.IHDF5ArchiveReader verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS, IArchiveEntryVisitor visitor)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.visitor
- The entry visitor to call for each entry. Call ArchiveEntry.isOK()
to
check whether verification was successful.java.util.List<ArchiveEntry> verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS, java.lang.String rootDirectoryInArchive, VerifyParameters params)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.rootDirectoryInArchive
- The root directory in the archive to start verify from. It will
be stripped from each entry before rootDirectoryOnFS is added.params
- The parameters to determine behavior of the verification process.java.util.List<ArchiveEntry> verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS, VerifyParameters params)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.params
- The parameters to determine behavior of the verification process.java.util.List<ArchiveEntry> verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.java.util.List<ArchiveEntry> verifyAgainstFilesystem(java.io.File rootDirectoryOnFS)
rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.java.util.List<ArchiveEntry> verifyAgainstFilesystem(java.io.File rootDirectoryOnFS, VerifyParameters params)
rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.params
- The parameters to determine behavior of the verification process.java.util.List<ArchiveEntry> verifyAgainstFilesystem(java.lang.String fileOrDir, java.io.File rootDirectoryOnFS, java.lang.String rootDirectoryInArchive)
fileOrDir
- The file or directory entry in the archive to verify. May be empty, in which
case all entries below rootDirectoryInArchive are verified.rootDirectoryOnFS
- The root directory on the file system that should be added to each
entry in the archive when comparing.rootDirectoryInArchive
- The root directory in the archive to start verify from. It will
be stripped from each entry before rootDirectoryOnFS is added.IHDF5ArchiveReader extractFile(java.lang.String path, java.io.OutputStream out)
OutputStream
.path
- The path of the file to extract the content of.out
- The output stream to extract the content to.byte[] extractFileAsByteArray(java.lang.String path)
path
- The path of the file to extract the content of.ch.systemsx.cisd.base.io.IInputStream extractFileAsIInputStream(java.lang.String path)
IInputStream
.path
- The path of the file to extract the content of.IErrorStrategy
of the archive reader does
not re-throw the exception, the return value will be null
on errors.java.io.InputStream extractFileAsInputStream(java.lang.String path)
InputStream
.path
- The path of the file to extract the content of.IErrorStrategy
of the archive reader does
not re-throw the exception, the return value will be null
on errors.IHDF5ArchiveReader extractToFilesystem(java.io.File rootDirectory)
rootDirectory
- The directory in the file system to use as root directory for the
extracted archive path.IHDF5ArchiveReader extractToFilesystem(java.io.File rootDirectory, java.lang.String path)
rootDirectory
- The directory in the file system to use as root directory for the
extracted archive path.path
- The path in the archive to extract. This path will be kept unchanged when
extracted.IHDF5ArchiveReader extractToFilesystem(java.io.File rootDirectory, java.lang.String path, IArchiveEntryVisitor visitorOrNull)
rootDirectory
- The directory in the file system to use as root directory for the
extracted archive path.path
- The path in the archive to extract. This path will be kept unchanged when
extracted.visitorOrNull
- The entry visitor to call for each entry. Call
ArchiveEntry.isOK()
to check whether verification was successful. May be
null
.IHDF5ArchiveReader extractToFilesystem(java.io.File rootDirectory, java.lang.String path, ArchivingStrategy strategy, IArchiveEntryVisitor visitorOrNull)
rootDirectory
- The directory in the file system to use as root directory for the
extracted archive path.path
- The path in the archive to extract. This path will be kept unchanged when
extracted.strategy
- The strategy to determine which files and directories to extract and which
ones to suppress.visitorOrNull
- The entry visitor to call for each entry. Call
ArchiveEntry.isOK()
to check whether verification was successful. May be
null
.IHDF5ArchiveReader extractToFilesystemBelowDirectory(java.io.File rootDirectory, java.lang.String rootInArchive)
rootDirectory
- The directory in the file system to use as root directory for the
extracted archive path.rootInArchive
- The root path in the archive to extract. This path will be stripped when
extracted.IHDF5ArchiveReader extractToFilesystemBelowDirectory(java.io.File rootDirectory, java.lang.String rootInArchive, IArchiveEntryVisitor visitorOrNull)
rootDirectory
- The directory in the file system to use as root directory for the
extracted archive path.rootInArchive
- The root path in the archive to extract. This path will be stripped when
extracted.visitorOrNull
- The entry visitor to call for each entry. Call
ArchiveEntry.isOK()
to check whether verification was successful. May be
null
.IHDF5ArchiveReader extractToFilesystemBelowDirectory(java.io.File rootDirectory, java.lang.String rootInArchive, ArchivingStrategy strategy, IArchiveEntryVisitor visitorOrNull)
rootDirectory
- The directory in the file system to use as root directory for the
extracted archive path.rootInArchive
- The root path in the archive to extract. This path will be stripped when
extracted.strategy
- The strategy to determine which files and directories to extract and which
ones to suppress.visitorOrNull
- The entry visitor to call for each entry. Call
ArchiveEntry.isOK()
to check whether verification was successful. May be
null
.IHDF5ArchiveReader extractToFilesystemBelowDirectory(java.io.File rootDirectory, java.lang.String rootInArchive, java.lang.String path, ArchivingStrategy strategy, IArchiveEntryVisitor visitorOrNull)
rootDirectory
- The directory in the file system to use as root directory for the
extracted archive path.rootInArchive
- The root path in the archive to extract. This path will be stripped when
extracted.path
- The path in the archive to extract, relative to rootPathInArchive.
This path will be kept unchanged when extracted.strategy
- The strategy to determine which files and directories to extract and which
ones to suppress.visitorOrNull
- The entry visitor to call for each entry. Call
ArchiveEntry.isOK()
to check whether verification was successful. May be
null
.