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
Fields declared in class com.ibm.dtfj.utils.file.SimpleFileManager
managedFile
Fields declared in class com.ibm.dtfj.utils.file.FileManager
logger, MIN_CORE_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkDirectoryToExtractTo
(File todir) Will check that the directory to extract to is a directory if it exists or create it otherwise.abstract void
extract
(ManagedImageSource file, File todir) abstract void
protected void
extractEntry
(InputStream in, File path) getImageSource
(String path) Returns a specified image source specified by the path in the zip fileabstract ImageInputStream
getStream
(ManagedImageSource source) Methods declared in class com.ibm.dtfj.utils.file.SimpleFileManager
getImageSources, getStream
Methods declared in class com.ibm.dtfj.utils.file.FileManager
createTempDir, fileExists, genJavacoreName, getJavaCoreNameFromPHD, getManager, isArchive
-
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
-