Package org.eclipse.jdt.ui.jarpackager
Class JarWriter
java.lang.Object
org.eclipse.jdt.ui.jarpackager.JarWriter
Deprecated.
Creates a JAR file for the given JAR package data.
Clients may subclass.
- Since:
- 2.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJarWriter(JarPackageData jarPackage, Shell parent) Deprecated.Creates an instance which is used to create a JAR based on the given JarPackage. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanCreateJar(Shell parent) Deprecated.Checks if the JAR file can be overwritten.voidclose()Deprecated.Closes the archive and does all required cleanup.voidDeprecated.Writes the passed resource to the current archive.protected voidDeprecated.Creates a new JarEntry with the passed path and contents, and writes it to the current archive.
-
Constructor Details
-
JarWriter
Deprecated.Creates an instance which is used to create a JAR based on the given JarPackage.- Parameters:
jarPackage- the JAR specificationparent- the shell used to display question dialogs, ornullif "false/no/cancel" is the answer and no dialog should be shown- Throws:
CoreException- to signal any other unusual termination. This can also be used to return information in the status object.
-
-
Method Details
-
close
Deprecated.Closes the archive and does all required cleanup.- Throws:
CoreException- to signal any other unusual termination. This can also be used to return information in the status object.
-
write
Deprecated.Writes the passed resource to the current archive.- Parameters:
resource- the file to be writtendestinationPath- the path for the file inside the archive- Throws:
CoreException- to signal any other unusual termination. This can also be used to return information in the status object.
-
write
Deprecated.Creates a new JarEntry with the passed path and contents, and writes it to the current archive.- Parameters:
path- the path inside the archivecontents- the bytes to writelastModified- a long which represents the last modification date- Throws:
IOException- if an I/O error has occurred
-
canCreateJar
Deprecated.Checks if the JAR file can be overwritten. If the JAR package setting does not allow to overwrite the JAR then a dialog will ask the user again.- Parameters:
parent- the parent for the dialog, ornullif no dialog should be presented- Returns:
trueif it is OK to create the JAR
-
JarWriter3instead.