Class FileBundleEntry
java.lang.Object
org.eclipse.osgi.storage.bundlefile.BundleEntry
org.eclipse.osgi.storage.bundlefile.FileBundleEntry
A BundleEntry represented by a File object. The FileBundleEntry class is used
for bundles that are installed as extracted zips on a file system.
-
Field Summary
Fields inherited from class org.eclipse.osgi.storage.bundlefile.BundleEntry
BUF_SIZE
-
Constructor Summary
ConstructorDescriptionFileBundleEntry
(File file, String name) Constructs the BundleEntry using a File. -
Method Summary
Modifier and TypeMethodDescriptionGet a URL to the content of the bundle entry that uses the file: protocol.Return an InputStream for the entry.Get a URL to the bundle entry that uses a common protocol (i.e. file: jar: or http: etc.).getName()
Return name of the entry.long
getSize()
Return size of the uncompressed entry.long
getTime()
Get the modification time for this BundleEntry.Methods inherited from class org.eclipse.osgi.storage.bundlefile.BundleEntry
getBytes, toString
-
Constructor Details
-
FileBundleEntry
Constructs the BundleEntry using a File.- Parameters:
file
- BundleFile object this entry is a member ofname
- the name of this BundleEntry
-
-
Method Details
-
getInputStream
Return an InputStream for the entry.- Specified by:
getInputStream
in classBundleEntry
- Returns:
- InputStream for the entry
- Throws:
IOException
-
getSize
public long getSize()Return size of the uncompressed entry.- Specified by:
getSize
in classBundleEntry
- Returns:
- size of entry
-
getName
Return name of the entry.- Specified by:
getName
in classBundleEntry
- Returns:
- name of entry
-
getTime
public long getTime()Get the modification time for this BundleEntry.If the modification time has not been set, this method will return
-1
.- Specified by:
getTime
in classBundleEntry
- Returns:
- last modification time.
-
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 classBundleEntry
- Returns:
- a URL to the bundle entry that uses a common protocol
-
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 classBundleEntry
- Returns:
- a URL to the content of the bundle entry that uses the file: protocol
-