public class JarEntryContentReference extends ContentReference
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,
JarContentReferenceDEFAULT_EXECUTABLE_PERMISSION, UNKNOWN_SIZE| Constructor and Description |
|---|
JarEntryContentReference(String id,
JarContentReference jarContentReference,
JarEntry entry)
Create jar entry content reference.
|
| Modifier and Type | Method and Description |
|---|---|
URL |
asURL()
Returns the content reference as a URL.
|
long |
getInputSize()
Returns the size of the referenced entry.
|
InputStream |
getInputStream()
Creates an input stream for the reference.
|
boolean |
isLocalReference()
Indicates whether the reference is to a an entry within a local jar.
|
String |
toString()
Return string representation of this reference.
|
asFile, createContentReference, getIdentifier, getLastModified, getPermission, setLastModified, setPermission, setTempLocalpublic JarEntryContentReference(String id, JarContentReference jarContentReference, JarEntry entry)
id - "symbolic" path identifierjarContentReference - jar file content referenceentry - jar entrypublic InputStream getInputStream() throws IOException
getInputStream in class ContentReferenceIOException - unable to create streampublic long getInputSize()
getInputSize in class ContentReferencepublic boolean isLocalReference()
isLocalReference in class ContentReferencetrue if the reference is local,
otherwise falsepublic URL asURL() throws IOException
asURL in class ContentReferenceIOException - reference cannot be returned as URLpublic String toString()
toString in class ContentReferenceGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.