FileDocCategorySizeDatePackage
MessageHeaders.javaAPI DocGlassfish v2 API3614Mon May 14 15:28:42 BST 2007com.sun.mail.dsn

MessageHeaders

public class MessageHeaders extends MimeMessage
A special MimeMessage object that contains only message headers, no content. Used to represent the MIME type text/rfc822-headers.

Fields Summary
Constructors Summary
public MessageHeaders()
Construct a MessageHeaders object.

	super((Session)null);
	content = new byte[0];
    
public MessageHeaders(InputStream is)
Constructs a MessageHeaders object from the given InputStream.

param
is InputStream

	super(null, is);
	content = new byte[0];
    
public MessageHeaders(InternetHeaders headers)
Constructs a MessageHeaders object using the given InternetHeaders.

param
headers InternetHeaders to use

	super((Session)null);
	this.headers = headers;
	content = new byte[0];
    
Methods Summary
protected java.io.InputStreamgetContentStream()

	return new ByteArrayInputStream(content);
    
public java.io.InputStreamgetInputStream()

	return new ByteArrayInputStream(content);
    
public intgetSize()
Return the size of this message. Always returns zero.

	return 0;
    
public voidsetDataHandler(javax.activation.DataHandler dh)
Can't set any content for a MessageHeaders object.

exception
MessagingException always

	throw new MessagingException("Can't set content for MessageHeaders");