Save This Page
Home » apache-ant-1.8.1 » org.apache.tools » ant » taskdefs » [javadoc | source]
org.apache.tools.ant.taskdefs
public class: Manifest [javadoc | source]
java.lang.Object
   org.apache.tools.ant.taskdefs.Manifest
Holds the data of a jar manifest. Manifests are processed according to the href="http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html">Jar specification. . Specifically, a manifest element consists of a set of attributes and sections. These sections in turn may contain attributes. Note in particular that this may result in manifest lines greater than 72 bytes being wrapped and continued on the next line. If an application can not handle the continuation mechanism, it is a defect in the application, not this task.
Nested Class Summary:
public static class  Manifest.Attribute  An attribute for the manifest. Those attributes that are not nested into a section will be added to the "Main" section. 
public static class  Manifest.Section  A manifest section - you can nest attribute elements into sections. A section consists of a set of attribute values, separated from other sections by a blank line. 
Field Summary
public static final  String ATTRIBUTE_MANIFEST_VERSION    The standard manifest version header 
public static final  String ATTRIBUTE_SIGNATURE_VERSION    The standard Signature Version header 
public static final  String ATTRIBUTE_NAME    The Name Attribute is the first in a named section 
public static final  String ATTRIBUTE_FROM    The From Header is disallowed in a Manifest 
public static final  String ATTRIBUTE_CLASSPATH    The Class-Path Header is special - it can be duplicated 
public static final  String DEFAULT_MANIFEST_VERSION    Default Manifest version if one is not specified 
public static final  int MAX_LINE_LENGTH    The max length of a line in a Manifest 
public static final  int MAX_SECTION_LENGTH    Max length of a line section which is continued. Need to allow for the CRLF. 
public static final  String EOL    The End-Of-Line marker in manifests 
public static final  String ERROR_FROM_FORBIDDEN    Error for attributes 
public static final  String JAR_ENCODING    Encoding to be used for JAR files. 
Constructor:
 public Manifest() 
 public Manifest(Reader r) throws ManifestException, IOException 
    Read a manifest file from the given reader
    Parameters:
    r - is the reader from which the Manifest is read
    Throws:
    ManifestException - if the manifest is not valid according to the JAR spec
    IOException - if the manifest cannot be read from the reader.
Method from org.apache.tools.ant.taskdefs.Manifest Summary:
addConfiguredAttribute,   addConfiguredSection,   equals,   getDefaultManifest,   getMainSection,   getManifestVersion,   getSection,   getSectionNames,   getWarnings,   hashCode,   merge,   merge,   merge,   toString,   write,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.taskdefs.Manifest Detail:
 public  void addConfiguredAttribute(Attribute attribute) throws ManifestException 
    Add an attribute to the manifest - it is added to the main section.
 public  void addConfiguredSection(Section section) throws ManifestException 
    Add a section to the manifest
 public boolean equals(Object rhs) 
 public static Manifest getDefaultManifest() throws BuildException 
    Construct a manifest from Ant's default manifest file.
 public Section getMainSection() 
    Get the main section of the manifest
 public String getManifestVersion() 
    Get the version of the manifest
 public Section getSection(String name) 
    Get a particular section from the manifest
 public Enumeration getSectionNames() 
    Get the section names in this manifest.
 public Enumeration getWarnings() 
    Get the warnings for this manifest.
 public int hashCode() 
 public  void merge(Manifest other) throws ManifestException 
    Merge the contents of the given manifest into this manifest without merging Class-Path attributes.
 public  void merge(Manifest other,
    boolean overwriteMain) throws ManifestException 
    Merge the contents of the given manifest into this manifest without merging Class-Path attributes.
 public  void merge(Manifest other,
    boolean overwriteMain,
    boolean mergeClassPaths) throws ManifestException 
    Merge the contents of the given manifest into this manifest
 public String toString() 
    Convert the manifest to its string representation
 public  void write(PrintWriter writer) throws IOException 
    Write the manifest out to a print writer without flattening multi-values attributes (i.e. Class-Path).
 public  void write(PrintWriter writer,
    boolean flatten) throws IOException 
    Write the manifest out to a print writer.