|
Eclipse JDT Release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.jdt.ui.jarpackager.JarWriter
Creates a JAR file for the given JAR package data. Clients may subclass.
JarPackageData| Constructor Summary | |
JarWriter(JarPackageData jarPackage,
org.eclipse.swt.widgets.Shell parent)
Creates an instance which is used to create a JAR based on the given JarPackage. |
|
| Method Summary | |
protected boolean |
canCreateJar(org.eclipse.swt.widgets.Shell parent)
Checks if the JAR file can be overwritten. |
void |
close()
Closes the archive and does all required cleanup. |
void |
write(org.eclipse.core.resources.IFile resource,
org.eclipse.core.runtime.IPath destinationPath)
Writes the passed resource to the current archive. |
protected void |
write(org.eclipse.core.runtime.IPath path,
byte[] contents,
long lastModified)
Creates a new JarEntry with the passed path and contents, and writes it to the current archive. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JarWriter(JarPackageData jarPackage,
org.eclipse.swt.widgets.Shell parent)
throws org.eclipse.core.runtime.CoreException
jarPackage - the JAR specificationparent - the shell used to display question dialogs,
or null if "false/no/cancel" is the answer
and no dialog should be shown
org.eclipse.core.runtime.CoreException - to signal any other unusual termination.
This can also be used to return information
in the status object.| Method Detail |
public void close()
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException - to signal any other unusual termination.
This can also be used to return information
in the status object.
public void write(org.eclipse.core.resources.IFile resource,
org.eclipse.core.runtime.IPath destinationPath)
throws org.eclipse.core.runtime.CoreException
resource - the file to be writtendestinationPath - the path for the file inside the archive
org.eclipse.core.runtime.CoreException - to signal any other unusual termination.
This can also be used to return information
in the status object.
protected void write(org.eclipse.core.runtime.IPath path,
byte[] contents,
long lastModified)
throws IOException
path - the path inside the archivecontents - the bytes to writelastModified - a long which represents the last modification date
IOException - if an I/O error has occurredprotected boolean canCreateJar(org.eclipse.swt.widgets.Shell parent)
parent - the parent for the dialog,
or null if no dialog should be presented
true if it is OK to create the JAR
|
Eclipse JDT Release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||