org.eclipse.osgi.baseadaptor.bundlefile
Class DirZipBundleEntry

java.lang.Object
  extended by org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry
      extended by org.eclipse.osgi.baseadaptor.bundlefile.DirZipBundleEntry

public class DirZipBundleEntry
extends BundleEntry

Represents a directory entry in a ZipBundleFile. This object is used to reference a directory entry in a ZipBundleFile when the directory entries are not included in the zip file.

Since:
3.2

Field Summary
 
Fields inherited from class org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry
BUF_SIZE
 
Constructor Summary
DirZipBundleEntry(ZipBundleFile bundleFile, java.lang.String name)
           
 
Method Summary
 java.net.URL getFileURL()
          Get a URL to the content of the bundle entry that uses the file: protocol.
 java.io.InputStream getInputStream()
          Return an InputStream for the entry.
 java.net.URL getLocalURL()
          Get a URL to the bundle entry that uses a common protocol (i.e. file: jar: or http: etc.).
 java.lang.String getName()
          Return the name of the entry.
 long getSize()
          Return the size of the entry (uncompressed).
 long getTime()
          Get the modification time for this BundleEntry.
 
Methods inherited from class org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry
getBytes, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirZipBundleEntry

public DirZipBundleEntry(ZipBundleFile bundleFile,
                         java.lang.String name)
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from class: BundleEntry
Return an InputStream for the entry.

Specified by:
getInputStream in class BundleEntry
Returns:
InputStream for the entry.
Throws:
java.io.IOException - If an error occurs reading the bundle.

getSize

public long getSize()
Description copied from class: BundleEntry
Return the size of the entry (uncompressed).

Specified by:
getSize in class BundleEntry
Returns:
size of entry.

getName

public java.lang.String getName()
Description copied from class: BundleEntry
Return the name of the entry.

Specified by:
getName in class BundleEntry
Returns:
name of entry.

getTime

public long getTime()
Description copied from class: BundleEntry
Get the modification time for this BundleEntry.

If the modification time has not been set, this method will return -1.

Specified by:
getTime in class BundleEntry
Returns:
last modification time.

getLocalURL

public java.net.URL getLocalURL()
Description copied from class: BundleEntry
Get a URL to the bundle entry that uses a common protocol (i.e. file: jar: or http: etc.).

Specified by:
getLocalURL in class BundleEntry
Returns:
a URL to the bundle entry that uses a common protocol

getFileURL

public java.net.URL getFileURL()
Description copied from class: BundleEntry
Get a URL to the content of the bundle entry that uses the file: protocol. The content of the bundle entry may be downloaded or extracted to the local file system in order to create a file: URL.

Specified by:
getFileURL in class BundleEntry
Returns:
a URL to the content of the bundle entry that uses the file: protocol