|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.util.ZipUtil
Utilities for dealing with ZipFiles in Java 1.1.
Constructor Summary | |
ZipUtil()
|
Method Summary | |
static void |
addFilesToZipFile(File[] files_to_add_update,
File target_zip_file)
Add each of file_to_add to the target_zip_file
creating the zip file if necessary. |
static void |
addFilesToZipFile(File reference_directory,
File[] files_to_add_update,
File target_zip_file)
Add each of file_to_add to the target_zip_file ,
but in the jar, locate it in a subdirectory relative to the reference_directory . |
static void |
addFileToZipFile(File file_to_add,
File target_zip_file)
Add the file_to_add to the target_zip_file
creating the zip file if necessary. |
static void |
addFileToZipFile(File reference_directory,
File file_to_add,
File target_zip_file)
Add the file_to_add to the target_zip_file ,
but in the jar, locate it in a subdirectory relative to the reference_directory . |
private static void |
bufferInputStreamToOutputStream(InputStream input_stream,
OutputStream output_stream)
Move the contents of input_stream to output_stream . |
private static File |
createTempFileFor(File file)
Create a temp file based on the specified file's path and name. |
static String |
getRelativePathAndTrailingDelimiter(File reference_directory,
File file_to_add)
Determines the relative path and the correct delimiter for the platform needed to add this file to the UpgradeManagerOutputs.jar. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZipUtil()
Method Detail |
public static void addFileToZipFile(File file_to_add, File target_zip_file) throws IOException
file_to_add
to the target_zip_file
creating the zip file if necessary.
This method works by re-writing each entry of the existing zip file into a new temp file and then appending the file to add.
WARNING: This method does not check if the files being added are already in the zip file.
IOException
- if any errors occur reading the existing file or file to add, or if an error occurs writing the new zip filepublic static void addFileToZipFile(File reference_directory, File file_to_add, File target_zip_file) throws IOException
file_to_add
to the target_zip_file
,
but in the jar, locate it in a subdirectory relative to the reference_directory
.
Create the zip file if necessary.
This method works by re-writing each entry of the existing zip file into a new temp file and then appending the file to add.
WARNING: This method does not check if the files being added are already in the zip file.
IOException
- if any errors occur reading the existing file or file to add, or if an error occurs writing the new zip filepublic static void addFilesToZipFile(File[] files_to_add_update, File target_zip_file) throws IOException
file_to_add
to the target_zip_file
creating the zip file if necessary.
This method works by re-writing each entry of the existing zip file into a new temp file and then appending the file to add.
WARNING: This method does not check if the files being added are already in the zip file.
IOException
- if any errors occur reading the existing file or file to add, or if an error occurs writing the new zip filepublic static void addFilesToZipFile(File reference_directory, File[] files_to_add_update, File target_zip_file) throws IOException
file_to_add
to the target_zip_file
,
but in the jar, locate it in a subdirectory relative to the reference_directory
.
Create the zip file if necessary.
This method works by re-writing each entry of the existing zip file into a new temp file and then appending the file to add.
WARNING: This method does not check if the files being added are already in the zip file.
IOException
- if any errors occur reading the existing file or file to add, or if an error occurs writing the new zip fileprivate static void bufferInputStreamToOutputStream(InputStream input_stream, OutputStream output_stream) throws IOException
input_stream
to output_stream
.
IOException
private static File createTempFileFor(File file)
public static String getRelativePathAndTrailingDelimiter(File reference_directory, File file_to_add) throws FileNotFoundException
reference_directory
- File reference_directory is the directory that contains all the sub-directories the file_to_add could be.file_to_add
- File file_to_add is the file that is to be added to the jar file. It contains its full path.
FileNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |