org.apache.ace.obr.storage
Interface BundleStore

All Superinterfaces:
org.osgi.service.cm.ManagedService
All Known Implementing Classes:
BundleFileStore

public interface BundleStore
extends org.osgi.service.cm.ManagedService


Method Summary
 InputStream get(String fileName)
          Returns an InputStream to the data of the specified resource.
 boolean put(String fileName, InputStream data)
          Stores the specified resource in the store.
 boolean remove(String filename)
          Removes the specified resource from the store.
 
Methods inherited from interface org.osgi.service.cm.ManagedService
updated
 

Method Detail

get

InputStream get(String fileName)
                throws IOException
Returns an InputStream to the data of the specified resource.

Parameters:
fileName - Identifier of the requested resource.
Returns:
InputStream to the requested resource or null if no such resource is available.
Throws:
IOException - If there was a problem returning the requested resource.

put

boolean put(String fileName,
            InputStream data)
            throws IOException
Stores the specified resource in the store.

Parameters:
fileName - Identifier of the resource.
data - The actual data of the resource.
Returns:
true if the resource was successfully stored, false if the resource already existed
Throws:
IOException - If there was a problem reading or writing the data of the resource.

remove

boolean remove(String filename)
               throws IOException
Removes the specified resource from the store.

Parameters:
filename - Identifier of the resource.
Returns:
true if the resource was successfully removed, false if the resource was not present to begin with
Throws:
IOException - If there was a problem removing the data of the resource from the store.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.