org.apache.tools.ant.taskdefs
Class Manifest.Attribute

java.lang.Object
  |
  +--org.apache.tools.ant.taskdefs.Manifest.Attribute
Enclosing class:
Manifest

public static class Manifest.Attribute
extends java.lang.Object

Class to hold manifest attributes


Constructor Summary
Manifest.Attribute()
          Construct an empty attribute
Manifest.Attribute(java.lang.String line)
          Construct an attribute by parsing a line from the Manifest
Manifest.Attribute(java.lang.String name, java.lang.String value)
          Construct a manifest by specifying its name and value
 
Method Summary
 void addContinuation(java.lang.String line)
          Add a continuation line from the Manifest file When lines are too long in a manifest, they are continued on the next line by starting with a space.
 boolean equals(java.lang.Object rhs)
           
 java.lang.String getName()
          Get the Attribute's name
 java.lang.String getValue()
          Get the Attribute's value
 void parse(java.lang.String line)
          Parse a line into name and value pairs
 void setName(java.lang.String name)
          Set the Attribute's name
 void setValue(java.lang.String value)
          Set the Attribute's value
 void write(java.io.PrintWriter writer)
          Write the attribute out to a print writer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Manifest.Attribute

public Manifest.Attribute()
Construct an empty attribute

Manifest.Attribute

public Manifest.Attribute(java.lang.String line)
                   throws ManifestException
Construct an attribute by parsing a line from the Manifest
Parameters:
line - the line containing the attribute name and value
Throws:
ManifestException - if the line is not valid

Manifest.Attribute

public Manifest.Attribute(java.lang.String name,
                          java.lang.String value)
Construct a manifest by specifying its name and value
Parameters:
name - the attribute's name
value - the Attribute's value
Method Detail

equals

public boolean equals(java.lang.Object rhs)
Overrides:
equals in class java.lang.Object

parse

public void parse(java.lang.String line)
           throws ManifestException
Parse a line into name and value pairs
Parameters:
line - the line to be parsed
Throws:
ManifestException - if the line does not contain a colon separating the name and value

setName

public void setName(java.lang.String name)
Set the Attribute's name
Parameters:
name - the attribute's name

getName

public java.lang.String getName()
Get the Attribute's name
Returns:
the attribute's name.

setValue

public void setValue(java.lang.String value)
Set the Attribute's value
Parameters:
value - the attribute's value

getValue

public java.lang.String getValue()
Get the Attribute's value
Returns:
the attribute's value.

addContinuation

public void addContinuation(java.lang.String line)
Add a continuation line from the Manifest file When lines are too long in a manifest, they are continued on the next line by starting with a space. This method adds the continuation data to the attribute value by skipping the first character.

write

public void write(java.io.PrintWriter writer)
           throws java.io.IOException
Write the attribute out to a print writer.
Parameters:
writer - the Writer to which the attribute is written
Throws:
java.io.IOException - if the attribte value cannot be written


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.