net.sourceforge.osgi.deployment.maven.manifest
Class OrderedManifest

java.lang.Object
  extended by net.sourceforge.osgi.deployment.maven.manifest.OrderedManifest
Direct Known Subclasses:
DeploymentPackageManifest

public class OrderedManifest
extends java.lang.Object

The OrderedManifest stores manifest entries in a defined order.

Author:
Siamak Haschemi, haschemi@informatik.hu-berlin.de

Field Summary
protected static java.lang.String CONTENT_TYPE
          Content-Type manifest attribute.
protected static net.sourceforge.osgi.deployment.maven.manifest.OrderedManifest.ManifestEntry EMPTY_LINE
          An empty line on the manifest.
static java.util.regex.Pattern HEADER_PATTERN
          A pattern to verify the header of a manifest entry.
static java.lang.String MANIFEST_VERSION
          Manifest-Version manifest attribute.
 
Constructor Summary
OrderedManifest()
           
 
Method Summary
 void add(net.sourceforge.osgi.deployment.maven.manifest.OrderedManifest.ManifestEntry p_manifestEntry)
          Add a ManifestEntry to the OrderedManifest.
 void add(java.lang.String p_header, java.lang.String p_value)
          Add a key/value pair to the OrderedManifest.
 void write(java.io.OutputStream p_out)
          Write the current contents of the OrderedManifest into a OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MANIFEST_VERSION

public static final java.lang.String MANIFEST_VERSION
Manifest-Version manifest attribute. This attribute indicates the version number of the manifest standard to which a JAR file's manifest conforms.

See Also:
Manifest and Signature Specification, Constant Field Values

HEADER_PATTERN

public static final java.util.regex.Pattern HEADER_PATTERN
A pattern to verify the header of a manifest entry.


CONTENT_TYPE

protected static final java.lang.String CONTENT_TYPE
Content-Type manifest attribute.

See Also:
Constant Field Values

EMPTY_LINE

protected static final net.sourceforge.osgi.deployment.maven.manifest.OrderedManifest.ManifestEntry EMPTY_LINE
An empty line on the manifest.

Constructor Detail

OrderedManifest

public OrderedManifest()
Method Detail

add

public final void add(net.sourceforge.osgi.deployment.maven.manifest.OrderedManifest.ManifestEntry p_manifestEntry)
Add a ManifestEntry to the OrderedManifest.

Parameters:
p_manifestEntry - the ManifestEntry to add

add

public final void add(java.lang.String p_header,
                      java.lang.String p_value)
Add a key/value pair to the OrderedManifest.

Parameters:
p_header - The header to add
p_value - the value for the header to add

write

public final void write(java.io.OutputStream p_out)
                 throws java.io.IOException
Write the current contents of the OrderedManifest into a OutputStream.

Parameters:
p_out - the OutputStream to write into
Throws:
java.io.IOException - If the writing of the OrderedManifest fails.


Copyright © 2008 Humboldt University Berlin. All Rights Reserved.