org.apache.james.mime4j.parser
Class RawEntity

java.lang.Object
  extended by org.apache.james.mime4j.parser.RawEntity
All Implemented Interfaces:
EntityStateMachine

public class RawEntity
extends java.lang.Object
implements EntityStateMachine

Raw MIME entity. Such entities will not be parsed into elements by the parser. They are meant to be consumed as a raw data stream by the caller.


Method Summary
 EntityStateMachine advance()
          Advances the state machine to the next state in the process of the MIME stream parsing.
 BodyDescriptor getBodyDescriptor()
          This method has no effect and always returns null.
 java.io.InputStream getContentStream()
          Returns raw data stream.
 Field getField()
          This method has no effect and always returns null.
 java.lang.String getFieldName()
          This method has no effect and always returns null.
 java.lang.String getFieldValue()
          This method has no effect and always returns null.
 int getState()
          Return the current state of the entity.
 void setRecursionMode(int recursionMode)
          This method has no effect.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getState

public int getState()
Description copied from interface: EntityStateMachine
Return the current state of the entity.

Specified by:
getState in interface EntityStateMachine
Returns:
current state
See Also:
EntityStates

setRecursionMode

public void setRecursionMode(int recursionMode)
This method has no effect.

Specified by:
setRecursionMode in interface EntityStateMachine
See Also:
RecursionMode

advance

public EntityStateMachine advance()
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.

Specified by:
advance in interface EntityStateMachine
Returns:
a state machine of an embedded entity, if encountered, null otherwise.

getContentStream

public java.io.InputStream getContentStream()
Returns raw data stream.

Specified by:
getContentStream in interface EntityStateMachine
Returns:
input stream

getBodyDescriptor

public BodyDescriptor getBodyDescriptor()
This method has no effect and always returns null.

Specified by:
getBodyDescriptor in interface EntityStateMachine
Returns:
body description

getField

public Field getField()
This method has no effect and always returns null.

Specified by:
getField in interface EntityStateMachine
Returns:
header field

getFieldName

public java.lang.String getFieldName()
This method has no effect and always returns null.


getFieldValue

public java.lang.String getFieldValue()
This method has no effect and always returns null.



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