com.sun.enterprise.universal.collections
Class ManifestUtils

java.lang.Object
  extended by com.sun.enterprise.universal.collections.ManifestUtils

public class ManifestUtils
extends java.lang.Object

all-static methods for handling operations with Manifests It automatically replace all occurences of EOL_TOKEN with linefeeds

Author:
bnevins

Field Summary
static java.lang.String EOL
          The line separator character on this OS
static java.lang.String EOL_TOKEN
          Embed this token to encode linefeeds in Strings that are placed in Manifest objects
static java.lang.String MAIN_ATTS
          The name of the Manifest's main attributes.
 
Method Summary
static java.lang.String decode(java.lang.String s)
           
static java.lang.String encode(java.lang.String s)
           
static java.util.Map<java.lang.String,java.lang.String> getMain(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> exManifest)
           
static java.util.Map<java.lang.String,java.lang.String> normalize(java.util.jar.Attributes att)
          Convert an Aattributes object into a Map
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> normalize(java.util.jar.Manifest m)
          Convert a Manifest into an easier data structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOL_TOKEN

public static final java.lang.String EOL_TOKEN
Embed this token to encode linefeeds in Strings that are placed in Manifest objects

See Also:
Constant Field Values

MAIN_ATTS

public static final java.lang.String MAIN_ATTS
The name of the Manifest's main attributes.

See Also:
Constant Field Values

EOL

public static final java.lang.String EOL
The line separator character on this OS

Method Detail

normalize

public static final java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> normalize(java.util.jar.Manifest m)
Convert a Manifest into an easier data structure. It returns a Map of Maps. The main attributes become the map where the key is MAIN_ATTS. Entries become named maps as in the Manifest

Parameters:
m -
Returns:

normalize

public static final java.util.Map<java.lang.String,java.lang.String> normalize(java.util.jar.Attributes att)
Convert an Aattributes object into a Map

Parameters:
att -
Returns:

encode

public static final java.lang.String encode(java.lang.String s)

getMain

public static java.util.Map<java.lang.String,java.lang.String> getMain(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> exManifest)

decode

public static java.lang.String decode(java.lang.String s)


Copyright © 2012 GlassFish Community. All Rights Reserved.