public class ManifestBuilder
extends java.lang.Object
Manifest in the style of a builder pattern.| Constructor and Description |
|---|
ManifestBuilder()
Creates a new
ManifestBuilder. |
ManifestBuilder(java.util.jar.Manifest manifest)
Creates a new
ManifestBuilder using an existing manifest. |
| Modifier and Type | Method and Description |
|---|---|
java.util.jar.Manifest |
build() |
ManifestBuilder |
entry(java.lang.String entry)
Sets the current entry of the builder.
|
ManifestBuilder |
put(java.lang.Object name,
java.lang.Object value)
Stores a new attribute in this manifest.
|
ManifestBuilder |
put(java.lang.String entry,
java.lang.Object name,
java.lang.Object value)
Stores a new attribute in this manifest, putting it under a specific entry.
|
void |
read(java.io.InputStream is) |
void |
write(java.io.OutputStream os) |
public ManifestBuilder(java.util.jar.Manifest manifest)
ManifestBuilder using an existing manifest.manifest - an existing manifestpublic ManifestBuilder()
ManifestBuilder.public ManifestBuilder entry(java.lang.String entry)
The current entry affects the entry value of future put(Object, Object) calls,
unless the entry is explicitly stated like in put(String, Object, Object).
entry - the new current entry valuepublic ManifestBuilder put(java.lang.Object name, java.lang.Object value)
name - the name of the attributevalue - the value of the attributepublic ManifestBuilder put(java.lang.String entry, java.lang.Object name, java.lang.Object value)
entry - the entry for this single attributename - the name of the attributevalue - the value of the attributepublic java.util.jar.Manifest build()
Manifestpublic void write(java.io.OutputStream os)
throws java.io.IOException
java.io.IOExceptionpublic void read(java.io.InputStream is)
throws java.io.IOException
java.io.IOException