# Class FileBundleEntry

java.lang.Object
org.eclipse.osgi.storage.bundlefile.BundleEntry
org.eclipse.osgi.storage.bundlefile.FileBundleEntry

public class FileBundleEntry extends BundleEntry
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 BundleEntry

`BUF_SIZE`

## Constructor Summary

Constructors
Constructor
Description
`FileBundleEntry(File file, String name)`
Constructs the BundleEntry using a File.

## Method Summary

Modifier and Type
Method
Description
`URL`
`getFileURL()`
Get a URL to the content of the bundle entry that uses the file: protocol.
`InputStream`
`getInputStream()`
Return an InputStream for the entry.
`URL`
`getLocalURL()`
Get a URL to the bundle entry that uses a common protocol (i.e. file: jar: or http: etc.).
`String`
`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 BundleEntry

`getBytes, toString`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### FileBundleEntry

public FileBundleEntry(File file, String name)
Constructs the BundleEntry using a File.

Parameters:
  `file` - BundleFile object this entry is a member of
  `name` - the name of this BundleEntry

## Method Details

### getInputStream

public InputStream getInputStream() throws IOException
Return an InputStream for the entry.

Specified by:
  `getInputStream` in class `BundleEntry`
Returns:
  InputStream for the entry
Throws:
  `IOException`

### getSize

public long getSize()
Return size of the uncompressed entry.

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

### getName

public String getName()
Return name of the entry.

Specified by:
  `getName` in class `BundleEntry`
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 class `BundleEntry`
Returns:
  last modification time.

### getLocalURL

public 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 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