|
Eclipse Platform 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.eclipse.update.core.ContentReference
Content reference implements a general access wrapper to feature and site content. The reference specifies a "symbolic" path identifier for the content, and the actual reference as a file, or a URL.
This class may be instantiated or subclassed by clients.
JarContentReference,
JarEntryContentReference| Field Summary | |
static long |
UNKNOWN_SIZE
Unknown size indication |
| Constructor Summary | |
ContentReference(String id,
File file)
Create content reference from file. |
|
ContentReference(String id,
URL url)
Create content reference from URL. |
|
| Method Summary | |
File |
asFile()
Returns the content reference as a file. |
URL |
asURL()
Returns the content reference as a URL. |
ContentReference |
createContentReference(String id,
File file)
A factory method to create a content reference of the same type. |
String |
getIdentifier()
Retrieves the "symbolic" path identifier for the reference. |
long |
getInputSize()
Returns the size of the referenced input, if it can be determined. |
InputStream |
getInputStream()
Creates an input stream for the reference. |
boolean |
isLocalReference()
Indicates whether the reference is a local file reference. |
String |
toString()
Return string representation of this reference. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final long UNKNOWN_SIZE
| Constructor Detail |
public ContentReference(String id,
URL url)
id - "symbolic" path identifierurl - actual referenced URL
public ContentReference(String id,
File file)
id - "symbolic" path identifierfile - actual referenced file| Method Detail |
public ContentReference createContentReference(String id,
File file)
id - "symbolic" path identifierfile - actual referenced file
public String getIdentifier()
public InputStream getInputStream()
throws IOException
IOException - unable to create stream
public long getInputSize()
throws IOException
IOExceptionpublic boolean isLocalReference()
true if the reference is local,
otherwise false
public File asFile()
throws IOException
IOException - reference cannot be returned as file
public URL asURL()
throws IOException
IOException - reference cannot be returned as URLpublic String toString()
toString in class Object
|
Eclipse Platform 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||