Class ManifestUtils

java.lang.Object
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 Details

    • EOL_TOKEN

      public static final String EOL_TOKEN
      Embed this token to encode linefeeds in Strings that are placed in Manifest objects
      See Also:
    • MAIN_ATTS

      public static final String MAIN_ATTS
      The name of the Manifest's main attributes.
      See Also:
    • EOL

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

    • 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)