org.apache.james.jdkim.impl
Class Message

java.lang.Object
  extended by org.apache.james.jdkim.impl.Message
All Implemented Interfaces:
Headers

public class Message
extends Object
implements Headers

The header of an entity (see RFC 2045).


Constructor Summary
Message(InputStream is)
          Creates a new Header from the specified stream.
 
Method Summary
 void dispose()
          Make sure to dispose the message once used.
 InputStream getBodyInputStream()
           
 List<String> getFields()
          Gets the fields of this header.
 List<String> getFields(String name)
          Gets all Fields having the specified field name in a case insensitive way.
 String toString()
          Return Header Object as String representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message(InputStream is)
        throws IOException,
               org.apache.james.mime4j.MimeException
Creates a new Header from the specified stream.

Parameters:
is - the stream to read the header from.
Throws:
IOException - on I/O errors.
org.apache.james.mime4j.MimeIOException - on MIME protocol violations.
org.apache.james.mime4j.MimeException
Method Detail

getBodyInputStream

public InputStream getBodyInputStream()

getFields

public List<String> getFields()
Description copied from interface: Headers
Gets the fields of this header. The returned list will not be modifiable.

Specified by:
getFields in interface Headers
Returns:
the list of Field objects.
See Also:
Headers.getFields()

getFields

public List<String> getFields(String name)
Description copied from interface: Headers
Gets all Fields having the specified field name in a case insensitive way.

Specified by:
getFields in interface Headers
Parameters:
name - the field name (e.g. From, Subject).
Returns:
the list of fields.
See Also:
Headers.getFields(java.lang.String)

toString

public String toString()
Return Header Object as String representation. Each headerline is seperated by "\r\n"

Overrides:
toString in class Object
Returns:
headers

dispose

public void dispose()
Make sure to dispose the message once used.



Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.