Package org.apache.james.mime4j.stream
Class RawEntity
java.lang.Object
org.apache.james.mime4j.stream.RawEntity
- All Implemented Interfaces:
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadvance()
Advances the state machine to the next state in the process of the MIME stream parsing.This method has no effect and always returnsnull
.Returns raw data stream.Returns the decoded content stream of the entity body.getField()
This method has no effect and always returnsnull
.This method has no effect and always returnsnull
.This method has no effect and always returnsnull
.getState()
Return the current state of the entity.void
setRecursionMode
(RecursionMode recursionMode) This method has no effect.
-
Field Details
-
stream
-
state
-
-
Constructor Details
-
RawEntity
RawEntity(InputStream stream)
-
-
Method Details
-
getState
Description copied from interface:EntityStateMachine
Return the current state of the entity.- Specified by:
getState
in interfaceEntityStateMachine
- Returns:
- current state
- See Also:
-
setRecursionMode
This method has no effect.- Specified by:
setRecursionMode
in interfaceEntityStateMachine
- Parameters:
recursionMode
-- See Also:
-
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 interfaceEntityStateMachine
- Returns:
- a state machine of an embedded entity, if encountered,
null
otherwise.
-
getContentStream
Returns raw data stream.- Specified by:
getContentStream
in interfaceEntityStateMachine
- Returns:
- input stream
-
getBodyDescriptor
This method has no effect and always returnsnull
.- Specified by:
getBodyDescriptor
in interfaceEntityStateMachine
- Returns:
- body description
-
getField
This method has no effect and always returnsnull
.- Specified by:
getField
in interfaceEntityStateMachine
- Returns:
- header field
-
getFieldName
This method has no effect and always returnsnull
. -
getFieldValue
This method has no effect and always returnsnull
. -
getDecodedContentStream
Description copied from interface:EntityStateMachine
Returns the decoded content stream of the entity body.- Specified by:
getDecodedContentStream
in interfaceEntityStateMachine
- Returns:
- input stream
- Throws:
IllegalStateException
- if the content stream cannot be obtained at the current stage of the parsing process.- See Also:
-