Static Public Member Functions | |
static String | ExtractTarball (String sTarball, String sTempRoot) throws ModelException |
Extracts a tarball's entries into the designated temp folder. | |
static InputStream | UnzipFile (String sFileToGet) throws ModelException |
This converts a gzipped file to an uncompressed file stream. | |
static String | ExtractTarballFile (String sTarball, String sFileName) throws ModelException |
Extracts a file from .gz.tar land to plaintext. | |
static void | CleanUp (String sTarball, String sTempDir, String sTempRoot) |
Deletes all files from the tarball in the temp folder. | |
static String[] | GetTarballEntries (String sTarball) throws ModelException |
Gets a list of file entries in the tarball. | |
Static Private Member Functions | |
static void | ExtractFile (String sTarball, TarEntry oEntry, File oDestFile) throws java.io. IOException |
Extracts a single file from a tar archive. |
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
|
Deletes all files from the tarball in the temp folder.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Extracts a single file from a tar archive. I grabbed and modified this from the TarTool package - method ice.com.tartool.ArchiveTreePanel.extractFile. That code is in the public domain. The original author is Timothy Gerard Endres. I stripped out the code that didn't have anything to do with how our files work. The original code supported MIME types and ascii files, and we will never be bothering with either. When I say that this method "extracts" a file, what it does is copies the contents of the file out of the tar archive and into a destination file. The original tar archive is unchanged and still contains the extracted file.
|
|
Extracts a tarball's entries into the designated temp folder. If there is file info in the tar archive, they automatically get put in a sub folder of the root directory.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Extracts a file from .gz.tar land to plaintext. The file will be placed in the same directory as the tarball.
|
|
Gets a list of file entries in the tarball. The list is of the core XML files, with no paths attached.
|
|
This converts a gzipped file to an uncompressed file stream.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |