public class TinyBundleImpl extends Object implements TinyBundle
| Constructor and Description |
|---|
TinyBundleImpl(org.ops4j.store.Store<InputStream> bstore) |
| Modifier and Type | Method and Description |
|---|---|
TinyBundle |
add(Class<?> clazz)
Add a class to the current bundle.
|
TinyBundle |
add(Class<?> clazz,
InnerClassStrategy strategy)
Add a class to the current bundle.
|
TinyBundle |
add(String name,
InputStream content)
Add a resource to the current bundle (to be built).
|
TinyBundle |
add(String name,
URL url)
Add a resource to the current bundle (to be built).
|
InputStream |
build()
Shortcut to
TinyBundle.build(BuildStrategy) witth buildstrategy = TinyBundles.withClassicBuilder(). |
InputStream |
build(BuildStrategy builder)
When you are done adding stuff to *this* you can call this method to go to next step.
|
String |
getHeader(String key)
Get header value.
|
TinyBundle |
read(InputStream in)
Read an existing bundle or jar into Tinybundles for modification.
|
TinyBundle |
read(InputStream in,
boolean readData)
Read an existing bundle or jar into Tinybundles for modification.
|
TinyBundle |
remove(Class<?> content)
remove a class to the current bundle.
|
TinyBundle |
removeHeader(String key)
Remove a previously added header.
|
TinyBundle |
removeResource(String key)
Remove a previously added resource.
|
TinyBundle |
set(String key,
String value)
Set header values that go into the Manifest.
|
public TinyBundleImpl(org.ops4j.store.Store<InputStream> bstore)
public TinyBundle read(InputStream in, boolean readData)
read in interface TinyBundlein - stream of JarInputStreampublic TinyBundle read(InputStream in)
TinyBundleread in interface TinyBundlein - stream of JarInputStreampublic TinyBundle add(Class<?> clazz)
add in interface TinyBundleclazz - content to be copied into bundle.public TinyBundle add(Class<?> clazz, InnerClassStrategy strategy)
TinyBundleadd in interface TinyBundlepublic TinyBundle remove(Class<?> content)
remove in interface TinyBundlecontent - class to be removedpublic TinyBundle add(String name, URL url)
add in interface TinyBundlename - final path inside the jarurl - content to be copied into bundle.public TinyBundle add(String name, InputStream content)
TinyBundleadd in interface TinyBundlename - final path inside the jarcontent - content to be copied into bundle.public InputStream build()
TinyBundleTinyBundle.build(BuildStrategy) witth buildstrategy = TinyBundles.withClassicBuilder().build in interface TinyBundlepublic InputStream build(BuildStrategy builder)
TinyBundlebuild in interface TinyBundlebuilder - builder to be used.public TinyBundle set(String key, String value)
TinyBundleset in interface TinyBundlekey - a keyvalue - a valuepublic TinyBundle removeResource(String key)
TinyBundleTinyBundles before.removeResource in interface TinyBundlekey - a key as Stringpublic TinyBundle removeHeader(String key)
TinyBundleTinyBundles before.removeHeader in interface TinyBundlekey - a key as Stringpublic String getHeader(String key)
TinyBundlegetHeader in interface TinyBundleCopyright © 2007–2014 OPS4J - Open Participation Software for Java. All rights reserved.