|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.ipojo.manipulator.store.DirectoryResourceStore
public class DirectoryResourceStore
A DirectoryResourceStore
knows how to read and write
resources from (to respectively) a File directory.
Constructor Summary | |
---|---|
DirectoryResourceStore(java.io.File source)
|
|
DirectoryResourceStore(java.io.File source,
java.io.File target)
|
Method Summary | |
---|---|
void |
accept(ResourceVisitor visitor)
Browse all resources available in this store. |
void |
close()
Close the store: no methods will be called anymore on this instance. |
void |
open()
Notify the store that resource will be written. |
byte[] |
read(java.lang.String path)
Return the bytecode of the given class name. |
void |
setManifest(java.util.jar.Manifest manifest)
|
void |
setManifestBuilder(ManifestBuilder manifestBuilder)
|
void |
setManifestFile(java.io.File manifestFile)
|
void |
setResourceMapper(ResourceMapper mapper)
|
void |
write(java.lang.String resourcePath,
byte[] bytecode)
Notify the builder that a new resource has been built and should be stored in the resulting bundle. |
void |
writeMetadata(org.apache.felix.ipojo.metadata.Element metadata)
Writes the given Element into this store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DirectoryResourceStore(java.io.File source)
public DirectoryResourceStore(java.io.File source, java.io.File target)
Method Detail |
---|
public void setResourceMapper(ResourceMapper mapper)
public void setManifestBuilder(ManifestBuilder manifestBuilder)
public void setManifest(java.util.jar.Manifest manifest)
public void setManifestFile(java.io.File manifestFile)
public byte[] read(java.lang.String path) throws java.io.IOException
ResourceStore
read
in interface ResourceStore
path
- normalized resource path (format: org/objectweb/asm/Visitor.class)
java.io.IOException
- if resource was not foundpublic void accept(ResourceVisitor visitor)
ResourceStore
accept
in interface ResourceStore
visitor
- is called for each available resourcepublic void open() throws java.io.IOException
ResourceStore
open
in interface ResourceStore
java.io.IOException
- if there was an errorpublic void writeMetadata(org.apache.felix.ipojo.metadata.Element metadata)
ResourceStore
writeMetadata
in interface ResourceStore
metadata
- Element metadata to be insertedpublic void write(java.lang.String resourcePath, byte[] bytecode) throws java.io.IOException
ResourceStore
write
in interface ResourceStore
resourcePath
- resource name of the class (format: org/objectweb/asm/Visitor.class)bytecode
- content of the resource
java.io.IOException
- if there was an error storing the resourcepublic void close() throws java.io.IOException
ResourceStore
close
in interface ResourceStore
java.io.IOException
- if close failed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |