Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.ui.jarpackager
Class JarWriter2


java.lang.Object
  extended by 
org.eclipse.jdt.ui.jarpackager.JarWriter2

Deprecated. Use JarWriter3 instead which leverages new EFS support

public class JarWriter2
extends Object

Creates a JAR file for the given JAR package data.

Clients may subclass.

Since:
3.1
See Also:
JarPackageData

Constructor Summary
JarWriter2 ( JarPackageData jarPackage, Shell parent)
          Deprecated. Creates an instance which is used to create a JAR based on the given JarPackage.
 
Method Summary
protected  void addDirectories ( IPath destinationPath, File correspondingFile)
          Deprecated. Creates the directory entries for the given path and writes it to the current archive.
protected  void addFile ( IFile resource, IPath path, File correspondingFile)
          Deprecated. Creates a new JarEntry with the passed path and contents, and writes it to the current archive.
protected  boolean canCreateJar ( Shell parent)
          Deprecated. Checks if the JAR file can be overwritten.
 void close ()
          Deprecated. Closes the archive and does all required cleanup.
 void write ( IFile resource, IPath destinationPath)
          Deprecated. Writes the passed resource to the current archive.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarWriter2

public JarWriter2(
JarPackageData jarPackage,
                  
Shell parent)
           throws 
CoreException
Deprecated. 
Creates an instance which is used to create a JAR based on the given JarPackage.

Parameters:
jarPackage - the JAR specification
parent - the shell used to display question dialogs, or null if "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 Detail

close

public void close()
           throws 
CoreException
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

public void write(
IFile resource,
                  
IPath destinationPath)
           throws 
CoreException
Deprecated. 
Writes the passed resource to the current archive.

Parameters:
resource - the file to be written
destinationPath - 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.

addFile

protected void addFile(
IFile resource,
                       
IPath path,
                       
File correspondingFile)
                throws 
IOException,
                       
CoreException
Deprecated. 
Creates a new JarEntry with the passed path and contents, and writes it to the current archive.

Parameters:
resource - the file to write
path - the path inside the archive
correspondingFile - the corresponding file in the file system or null if it doesn't exist
Throws:
IOException - if an I/O error has occurred
CoreException - if the resource can-t be accessed

addDirectories

protected void addDirectories(
IPath destinationPath,
                              
File correspondingFile)
                       throws 
IOException
Deprecated. 
Creates the directory entries for the given path and writes it to the current archive.

Parameters:
destinationPath - the path to add
correspondingFile - the corresponding file in the file system or null if it doesn't exist
Throws:
IOException - if an I/O error has occurred

canCreateJar

protected boolean canCreateJar(
Shell parent)
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, or null if no dialog should be presented
Returns:
true if it is OK to create the JAR

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire