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. |
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
static String javawrapper::Tarball::ExtractTarball | ( | String | sTarball, | |
String | sTempRoot | |||
) | throws ModelException [inline, static] |
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.
sTarball | Tarball to extract | |
sTempRoot | Temp root directory |
ModelException | wraps IOExceptions. |
static InputStream javawrapper::Tarball::UnzipFile | ( | String | sFileToGet | ) | throws ModelException [inline, static] |
This converts a gzipped file to an uncompressed file stream.
sFileToGet | - the file to uncompress. |
ModelException | if the file is not found, or wrapping another exception. |
static String javawrapper::Tarball::ExtractTarballFile | ( | String | sTarball, | |
String | sFileName | |||
) | throws ModelException [inline, static] |
Extracts a file from .gz.tar land to plaintext.
The file will be placed in the same directory as the tarball.
sTarball | Tarball in which the file is. | |
sFileName | Name of file to extract, with no path information and with no .gz or .tar extension (but with its plaintext extension). |
ModelException | if the file is bad. |
static void javawrapper::Tarball::CleanUp | ( | String | sTarball, | |
String | sTempDir, | |||
String | sTempRoot | |||
) | [inline, static] |
Deletes all files from the tarball in the temp folder.
sTarball | Tarball with the files to delete. | |
sTempDir | Directory from which files should be cleaned | |
sTempRoot | Temp directory root |
static String [] javawrapper::Tarball::GetTarballEntries | ( | String | sTarball | ) | throws ModelException [inline, static] |
Gets a list of file entries in the tarball.
The list is of the core XML files, with no paths attached.
sTarball | Tarball for which to get entries. |
ModelException | if there is a problem reading the file. |