Knopflerfish OSGi 5.2.0

org.osgi.service.indexer
Interface Resource


public interface Resource

A resource that is to be indexed.


Field Summary
static java.lang.String LAST_MODIFIED
          the name of the lastmodified attribute
static java.lang.String LOCATION
          the name of the location attribute
static java.lang.String NAME
          the name of the name attribute
static java.lang.String SIZE
          the name of the size attribute
 
Method Summary
 void close()
          Close the resource
 Resource getChild(java.lang.String path)
           
 java.lang.String getLocation()
           
 java.util.jar.Manifest getManifest()
           
 java.util.Dictionary<java.lang.String,java.lang.Object> getProperties()
           
 long getSize()
           
 java.io.InputStream getStream()
           
 java.util.List<java.lang.String> listChildren(java.lang.String prefix)
           
 

Field Detail

NAME

static final java.lang.String NAME
the name of the name attribute

See Also:
Constant Field Values

LOCATION

static final java.lang.String LOCATION
the name of the location attribute

See Also:
Constant Field Values

SIZE

static final java.lang.String SIZE
the name of the size attribute

See Also:
Constant Field Values

LAST_MODIFIED

static final java.lang.String LAST_MODIFIED
the name of the lastmodified attribute

See Also:
Constant Field Values
Method Detail

getLocation

java.lang.String getLocation()
Returns:
the value for the location attribute

getProperties

java.util.Dictionary<java.lang.String,java.lang.Object> getProperties()
Returns:
the properties

getSize

long getSize()
Returns:
the size of the resource

getStream

java.io.InputStream getStream()
                              throws java.io.IOException
Returns:
an input stream from which the resource can be read
Throws:
java.io.IOException - when an I/O error occurred

getManifest

java.util.jar.Manifest getManifest()
                                   throws java.io.IOException
Returns:
the manifest of the resource
Throws:
java.io.IOException - when an I/O error occurred

listChildren

java.util.List<java.lang.String> listChildren(java.lang.String prefix)
                                              throws java.io.IOException
Parameters:
prefix - the prefix of the children that must be returned (typically the directory in the JAR)
Returns:
a list of children under the specified prefix (typically the entries in the directory)
Throws:
java.io.IOException - when an I/O error occurred

getChild

Resource getChild(java.lang.String path)
                  throws java.io.IOException
Parameters:
path - the path of the child (typically the path in the JAR)
Returns:
the child on the specified path, as a resource
Throws:
java.io.IOException - when an I/O error occurred

close

void close()
Close the resource


Knopflerfish OSGi 5.2.0