All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class netscape.messaging.mime.Header

java.lang.Object
   |
   +----netscape.messaging.mime.Header

public class Header
extends Object
implements Cloneable
The Header class is used to represent the Header of the message.


Constructor Index

 o Header(byte[])
Header constructor.
 o Header(String)
Header constructor.
 o Header(String, String)
Header constructor.

Method Index

 o clone()
Clones an instance of the Header object.
 o getLine()
Returns the compelete header-line in the form : with CRLF termination.
 o getName()
Returns the name of this header.
 o getValue()
Returns the value of this header.

Constructors

 o Header
 public Header(String name,
               String value) throws MIMEException
Header constructor. Creates a Header object given header name and value strings.

Parameters:
name - Name of the header.
value - Value of the header.
Throws: MIMEException
If either name or value is null.
 o Header
 public Header(String inStr) throws MIMEException
Header constructor. Creates a Header object given a string in : format. Any '\r' and '\n' chars at the end of the line are stripped. All the chars in inStr must map to ASCII.

Parameters:
inStr. - A String with header in the form :
Throws: MIMEException
If inStr is null or not in : form.
 o Header
 public Header(byte line[]) throws MIMEException
Header constructor. Creates a Header object given a byte array with header in the form :. Any '\r' and '\n' chars at the end of the line are stripped. All the chars in line[] must be ASCII.

Parameters:
line. - A byte array with header in the form :
Throws: MIMEException
If line is null or not in : form.

Methods

 o getName
 public String getName()
Returns the name of this header.

 o getValue
 public String getValue()
Returns the value of this header.

 o getLine
 public String getLine()
Returns the compelete header-line in the form : with CRLF termination.

 o clone
 public Object clone()
Clones an instance of the Header object.

Overrides:
clone in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index