Class CompressedFileManager
java.lang.Object
com.ibm.dtfj.utils.file.FileManager
com.ibm.dtfj.utils.file.SimpleFileManager
com.ibm.dtfj.utils.file.CompressedFileManager
- Direct Known Subclasses:
GZipFileManager, ZipFileManager
Abstract class for handling compressed files
-
Field Summary
FieldsFields declared in class SimpleFileManager
managedFileFields declared in class FileManager
logger, MIN_CORE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckDirectoryToExtractTo(File todir) Will check that the directory to extract to is a directory if it exists or create it otherwise.abstract voidextract(ManagedImageSource file, File todir) abstract voidprotected voidextractEntry(InputStream in, File path) getImageSource(String path) Returns a specified image source specified by the path in the zip fileabstract ImageInputStreamgetStream(ManagedImageSource source) Methods declared in class SimpleFileManager
getImageSources, getStreamModifier and TypeMethodDescriptionGets a stream for the file which is being managed, this could be an archive file or a normal file.Methods declared in class FileManager
createTempDir, fileExists, genJavacoreName, getJavaCoreNameFromPHD, getManager, isArchiveModifier and TypeMethodDescriptionstatic FilecreateTempDir(File parent) Creates a unique temporary directory under the specified parentstatic booleanfileExists(File file) A platform aware file existence checker that allows for MVS datasets on z/OSprotected StringgenJavacoreName(String[] s, int inc, int componentToInc) protected String[]getJavaCoreNameFromPHD(String name) Generate a list of possible javacore names from a given phd name.static FileManagergetManager(File file) Factory method for getting the correct manager to deal with the supplied filestatic boolean
-
Field Details
-
buffer
protected final byte[] buffer
-
-
Constructor Details
-
CompressedFileManager
-
-
Method Details
-
extract
- Throws:
IOException
-
extract
- Throws:
IOException
-
getStream
- Throws:
IOException
-
checkDirectoryToExtractTo
Will check that the directory to extract to is a directory if it exists or create it otherwise.- Parameters:
todir- directory to extract to- Throws:
IllegalArgumentException- if the specified File is not a directory
-
getImageSource
Returns a specified image source specified by the path in the zip file- Parameters:
path- path within the zip- Returns:
- the created image
- Throws:
IOException- for problems creating the image or FileNotFoundException if the file specified by the path could not be found
-
extractEntry
- Throws:
IOException
-