|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.update.core.ContentReference
org.eclipse.update.core.JarContentReference
Local .jar file content reference.
This class may be instantiated or subclassed by clients.
Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
ContentReference
,
JarEntryContentReference
Nested Class Summary | |
static class |
JarContentReference.ContentSelector
Content selector used in .jar operations. |
Field Summary |
Fields inherited from class org.eclipse.update.core.ContentReference |
DEFAULT_EXECUTABLE_PERMISSION, UNKNOWN_SIZE |
Constructor Summary | |
JarContentReference(String id,
File file)
Create jar content reference from file. |
|
JarContentReference(String id,
File file,
boolean b)
Constructor JarContentReference. |
|
JarContentReference(String id,
URL url)
Create jar content reference from URL. |
Method Summary | |
protected JarFile |
asJarFile()
Returns the content reference as a jar file. |
void |
closeArchive()
Closes the jar archive corresponding to this reference. |
ContentReference |
createContentReference(String id,
File file)
A factory method to create a jar content reference. |
ContentReference[] |
peek(JarContentReference.ContentSelector selector,
InstallMonitor monitor)
Peeks into the referenced jar archive. |
ContentReference |
peek(String entryName,
JarContentReference.ContentSelector selector,
InstallMonitor monitor)
Peeks into the referenced jar archive looking for the named entry. |
static void |
shutdown()
Perform shutdown processing for jar archive handling. |
ContentReference[] |
unpack(File dir,
JarContentReference.ContentSelector selector,
InstallMonitor monitor)
Unpacks the referenced jar archive into the specified location. |
ContentReference |
unpack(File dir,
String entryName,
JarContentReference.ContentSelector selector,
InstallMonitor monitor)
Unpacks the named jar entry into the specified location. |
Methods inherited from class org.eclipse.update.core.ContentReference |
asFile, asURL, getIdentifier, getInputSize, getInputStream, getLastModified, getPermission, isLocalReference, setLastModified, setPermission, setTempLocal, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JarContentReference(String id, URL url)
id
- "symbolic" path identifierurl
- actual referenced URLpublic JarContentReference(String id, File file)
id
- "symbolic" path identifierfile
- actual referenced filepublic JarContentReference(String id, File file, boolean b)
id
- file
- b
- Method Detail |
public ContentReference createContentReference(String id, File file)
createContentReference
in class ContentReference
id
- "symbolic" path identifierfile
- actual referenced file
protected JarFile asJarFile() throws IOException
IOException
- reference cannot be returned as jar filepublic ContentReference[] unpack(File dir, JarContentReference.ContentSelector selector, InstallMonitor monitor) throws IOException, InstallAbortedException
dir
- location to unpack the jar intoselector
- selector, used to select entries to unpack, and to define
"symbolic" path identifiers for the entries.monitor
- progress monitor
IOException
InstallAbortedException
public ContentReference unpack(File dir, String entryName, JarContentReference.ContentSelector selector, InstallMonitor monitor) throws IOException, InstallAbortedException
dir
- location to unpack the jar intoentryName
- name of the jar entryselector
- selector, used to define "symbolic" path identifier
for the entrymonitor
- progress monitor
IOException
InstallAbortedException
public ContentReference[] peek(JarContentReference.ContentSelector selector, InstallMonitor monitor) throws IOException
selector
- selector, used to select entries to return, and to define
"symbolic" path identifiers for the entries.monitor
- progress monitor
IOException
public ContentReference peek(String entryName, JarContentReference.ContentSelector selector, InstallMonitor monitor) throws IOException
entryName
- name of the jar entryselector
- selector, used to define "symbolic" path identifier
for the entrymonitor
- progress monitor
null if the entry doesn't exist
- Throws:
IOException
- Since:
- 2.0
public void closeArchive() throws IOException
IOException
public static void shutdown()
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.