com.sun.enterprise.universal.collections
Class ManifestUtils

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

public class ManifestUtils
extends Object

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

Author:
bnevins

Field Summary
static String EOL
          The line separator character on this OS
static String EOL_TOKEN
          Embed this token to encode linefeeds in Strings that are placed in Manifest objects
static String MAIN_ATTS
          The name of the Manifest's main attributes.
 
Method Summary
static String decode(String s)
           
static String encode(String s)
           
static Map<String,String> getMain(Map<String,Map<String,String>> exManifest)
           
static Map<String,String> normalize(Attributes att)
          Convert an Aattributes object into a Map
static Map<String,Map<String,String>> normalize(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 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 String MAIN_ATTS
The name of the Manifest's main attributes.

See Also:
Constant Field Values

EOL

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

Method Detail

normalize

public static final Map<String,Map<String,String>> normalize(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 Map<String,String> normalize(Attributes att)
Convert an Aattributes object into a Map

Parameters:
att -
Returns:

encode

public static final String encode(String s)

getMain

public static Map<String,String> getMain(Map<String,Map<String,String>> exManifest)

decode

public static String decode(String s)


Copyright © 2012 GlassFish Community. All Rights Reserved.