Class Message

  • All Implemented Interfaces:
    Headers

    public class Message
    extends Object
    implements Headers
    The header of an entity (see RFC 2045).
    • 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.MimeException - on MIME protocol violations.
    • 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()
      • 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.