Eclipse Platform
2.0

org.eclipse.update.core
Class JarEntryContentReference

java.lang.Object
  |
  +--org.eclipse.update.core.ContentReference
        |
        +--org.eclipse.update.core.JarEntryContentReference

public class JarEntryContentReference
extends ContentReference

.jar file entry content reference

This class may be instantiated or subclassed by clients.

Since:
2.0
See Also:
ContentReference, JarContentReference

Field Summary
 
Fields inherited from class org.eclipse.update.core.ContentReference
UNKNOWN_SIZE
 
Constructor Summary
JarEntryContentReference(String id, JarContentReference jarContentReference, JarEntry entry)
          Create jar entry content reference
 
Method Summary
 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.
 
Methods inherited from class org.eclipse.update.core.ContentReference
asFile, createContentReference, getIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JarEntryContentReference

public JarEntryContentReference(String id,
                                JarContentReference jarContentReference,
                                JarEntry entry)
Create jar entry content reference

Parameters:
id - "symbolic" path identifier
jarContentReference - jar file content reference
entry - jar entry
Since:
2.0
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
Creates an input stream for the reference.

Overrides:
getInputStream in class ContentReference
Returns:
input stream
Throws:
IOException - unable to create stream
Since:
2.0

getInputSize

public long getInputSize()
Returns the size of the referenced entry.

Overrides:
getInputSize in class ContentReference
Returns:
input size
Since:
2.0

isLocalReference

public boolean isLocalReference()
Indicates whether the reference is to a an entry within a local jar.

Overrides:
isLocalReference in class ContentReference
Returns:
true if the reference is local, otherwise false
Since:
2.0

asURL

public URL asURL()
          throws IOException
Returns the content reference as a URL.

Overrides:
asURL in class ContentReference
Returns:
reference as URL
Throws:
IOException - reference cannot be returned as URL
Since:
2.0

toString

public String toString()
Return string representation of this reference.

Overrides:
toString in class ContentReference
Returns:
string representation
Since:
2.0

Eclipse Platform
2.0

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