Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.james.mime4j.parser
Class MimeEntity

    java.lang.Object
      org.apache.james.mime4j.parser.AbstractEntity
          org.apache.james.mime4j.parser.MimeEntity

All Implemented Interfaces:
  EntityStateMachine

    public class MimeEntity

extends AbstractEntity

Field Summary

Fields inherited from class org.apache.james.mime4j.parser.AbstractEntity
`body, config, endState, log, parent, startState, state`

Constructor Summary
`MimeEntity(RootInputStream rootStream, BufferedLineReaderInputStream inbuffer, BodyDescriptor parent, int startState, int endState)`
`MimeEntity(RootInputStream rootStream, BufferedLineReaderInputStream inbuffer, BodyDescriptor parent, int startState, int endState, MimeEntityConfig config)`

Method Summary
`EntityStateMachine` | `advance()` Advances the state machine to the next state in the process of the MIME stream parsing.
`java.io.InputStream` | `getContentStream()` Returns content stream of the entity body.
`protected LineReaderInputStream` | `getDataStream()`
`protected int` | `getLineNumber()`
`int` | `getRecursionMode()`
`void` | `setRecursionMode(int recursionMode)` Sets the current recursion mode.
`void` | `skipHeader(java.lang.String contentType)`

Methods inherited from class org.apache.james.mime4j.parser.AbstractEntity
`debug, getBodyDescriptor, getField, getFieldName, getFieldValue, getState, message, monitor, newBodyDescriptor, parseField, stateToString, toString, warn`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MimeEntity

    public MimeEntity(RootInputStream rootStream,
                      BufferedLineReaderInputStream inbuffer,
                      BodyDescriptor parent,
                      int startState,
                      int endState,
                      MimeEntityConfig config)

### MimeEntity

    public MimeEntity(RootInputStream rootStream,
                      BufferedLineReaderInputStream inbuffer,
                      BodyDescriptor parent,
                      int startState,
                      int endState)

Method Detail

### getRecursionMode

    public int getRecursionMode()

### setRecursionMode

    public void setRecursionMode(int recursionMode)

  Description copied from interface: `EntityStateMachine`
  Sets the current recursion mode. The recursion mode specifies the approach taken to parsing parts. `RecursionMode.M_RAW` mode does not parse the part at all. `RecursionMode.M_RECURSE` mode recursively parses each mail when an `message/rfc822` part is encounted; `RecursionMode.M_NO_RECURSE` does not.

  See Also:
    `RecursionMode`

### skipHeader

    public void skipHeader(java.lang.String contentType)

### getLineNumber

    protected int getLineNumber()

  Specified by:
    `getLineNumber` in class `AbstractEntity`

### getDataStream

    protected LineReaderInputStream getDataStream()

  Specified by:
    `getDataStream` in class `AbstractEntity`

### advance

    public EntityStateMachine advance()
                               throws java.io.IOException,
                                      MimeException

  Description copied from interface: `EntityStateMachine`
  Advances the state machine to the next state in the process of the MIME stream parsing. This method may return an new state machine that represents an embedded entity, which must be parsed before the parsing process of the current entity can proceed.

  Returns:
    a state machine of an embedded entity, if encountered, `null` otherwise.
  Throws:
    `java.io.IOException` - if an I/O error occurs.
    `MimeException` - if the message can not be processed due to the MIME specification violation.

### getContentStream

    public java.io.InputStream getContentStream()

  Description copied from interface: `EntityStateMachine`
  Returns content stream of the entity body.

  Returns:
    input stream

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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