All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.archiveaccessor.filestore.ManifestSection
java.lang.Object
|
+----com.ibm.archiveaccessor.filestore.ManifestSection
- public class ManifestSection
- extends Object
- implements Serializable, Cloneable
The ManifestSection class represents one section of a manifest from a
Jar file.
-
ManifestSection()
- Null constructor required for serialization.
-
ManifestSection(String)
- Normal constructor initializes the section name.
-
ManifestSection(String[])
- Loads a pre-existing manifest section.
-
add(String, String)
- Adds an item to the section.
-
addHash(byte[])
- Add MD5 and SHA security hashes to the section.
-
base64Hash(String, byte[])
- Returns a security hash as a base64 ASCII string.
-
clone()
- Clones the section.
-
equals(Object)
- Returns true if the section names are equal.
-
get()
- Returns the contents of the section as an array of strings.
-
get(String)
- Returns the value of an item in the section, or null.
-
hashCode()
- Returns a hash code value for this section.
-
remove(String)
- Removes an item from the section.
-
validate(byte[])
- Validate the security hash.
ManifestSection
public ManifestSection()
- Null constructor required for serialization.
ManifestSection
public ManifestSection(String id)
- Normal constructor initializes the section name.
- Parameters:
- id - path name.
ManifestSection
public ManifestSection(String header[])
- Loads a pre-existing manifest section.
- Parameters:
- header - an array of strings in the form "name: value", or
" value".
clone
public synchronized Object clone()
- Clones the section.
- Overrides:
- clone in class Object
equals
public synchronized boolean equals(Object o)
- Returns true if the section names are equal.
- Parameters:
- o - Another ManifestSection.
- Overrides:
- equals in class Object
hashCode
public synchronized int hashCode()
- Returns a hash code value for this section.
- Overrides:
- hashCode in class Object
remove
public synchronized void remove(String name)
- Removes an item from the section.
- Parameters:
- name - name of the item.
add
public synchronized void add(String name,
String value)
- Adds an item to the section.
- Parameters:
- name - name of the item.
- value - value assigned to the item.
get
public synchronized String get(String name)
- Returns the value of an item in the section, or null.
- Parameters:
- name - Name of the item.
- Returns:
- The assigned value.
get
public synchronized String[] get()
- Returns the contents of the section as an array of strings.
base64Hash
public static String base64Hash(String algorithm,
byte data[]) throws NoSuchAlgorithmException
- Returns a security hash as a base64 ASCII string.
- Parameters:
- algorithm - security hash algorithm name.
- data - the data to be hashed.
- Throws: NoSuchAlgorithmException
- unimplimented security hash.
addHash
public void addHash(byte data[])
- Add MD5 and SHA security hashes to the section.
- Parameters:
- data - the data associated with the section.
validate
public boolean validate(byte data[]) throws NoSuchAlgorithmException
- Validate the security hash.
- Parameters:
- data - the data associated with the section.
- Returns:
- true when valid.
- Throws: NoSuchAlgorithmException
- unimplimented security hash.
All Packages Class Hierarchy This Package Previous Next Index