Class FallbackBodyDescriptorBuilder
java.lang.Object
org.apache.james.mime4j.stream.FallbackBodyDescriptorBuilder
- All Implemented Interfaces:
BodyDescriptorBuilder
Encapsulates the values of the MIME-specific header fields
(which starts with
Content-).-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate longprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate Stringprivate Stringprivate final DecodeMonitorprivate final Stringprivate static final Stringprivate Stringprivate Stringprivate static final String -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new rootBodyDescriptorinstance.FallbackBodyDescriptorBuilder(String parentMimeType, DecodeMonitor monitor) Creates a newBodyDescriptorinstance. -
Method Summary
Modifier and TypeMethodDescriptionShould be called for eachContent-header field of a MIME message or part.build()Builds an instance ofBodyDescriptorbased on the internal state.newChild()Creates an instance ofBodyDescriptorBuilderto be used for processing of an embedded content body.private voidparseContentType(Field field) voidreset()Resets the internal state of the builder making it ready to process new input.
-
Field Details
-
US_ASCII
- See Also:
-
SUB_TYPE_EMAIL
- See Also:
-
MEDIA_TYPE_TEXT
- See Also:
-
MEDIA_TYPE_MESSAGE
- See Also:
-
EMAIL_MESSAGE_MIME_TYPE
- See Also:
-
DEFAULT_SUB_TYPE
- See Also:
-
DEFAULT_MEDIA_TYPE
- See Also:
-
DEFAULT_MIME_TYPE
- See Also:
-
parentMimeType
-
monitor
-
mediaType
-
subType
-
mimeType
-
boundary
-
charset
-
transferEncoding
-
contentLength
private long contentLength
-
-
Constructor Details
-
FallbackBodyDescriptorBuilder
public FallbackBodyDescriptorBuilder()Creates a new rootBodyDescriptorinstance. -
FallbackBodyDescriptorBuilder
Creates a newBodyDescriptorinstance.
-
-
Method Details
-
reset
public void reset()Description copied from interface:BodyDescriptorBuilderResets the internal state of the builder making it ready to process new input.- Specified by:
resetin interfaceBodyDescriptorBuilder
-
newChild
Description copied from interface:BodyDescriptorBuilderCreates an instance ofBodyDescriptorBuilderto be used for processing of an embedded content body. Please the child instance can inherit some of its parent properties such as MIME type.- Specified by:
newChildin interfaceBodyDescriptorBuilder
-
build
Description copied from interface:BodyDescriptorBuilderBuilds an instance ofBodyDescriptorbased on the internal state.- Specified by:
buildin interfaceBodyDescriptorBuilder
-
addField
Should be called for eachContent-header field of a MIME message or part.- Specified by:
addFieldin interfaceBodyDescriptorBuilder- Parameters:
field- the MIME field.- Throws:
MimeException
-
parseContentType
- Throws:
MimeException
-