Package org.apache.james.mime4j.stream
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 String
private String
private long
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private String
private String
private final DecodeMonitor
private final String
private static final String
private String
private String
private static final String
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new rootBodyDescriptor
instance.FallbackBodyDescriptorBuilder
(String parentMimeType, DecodeMonitor monitor) Creates a newBodyDescriptor
instance. -
Method Summary
Modifier and TypeMethodDescriptionShould be called for eachContent-
header field of a MIME message or part.build()
Builds an instance ofBodyDescriptor
based on the internal state.newChild()
Creates an instance ofBodyDescriptorBuilder
to be used for processing of an embedded content body.private void
parseContentType
(Field field) void
reset()
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 rootBodyDescriptor
instance. -
FallbackBodyDescriptorBuilder
Creates a newBodyDescriptor
instance.
-
-
Method Details
-
reset
public void reset()Description copied from interface:BodyDescriptorBuilder
Resets the internal state of the builder making it ready to process new input.- Specified by:
reset
in interfaceBodyDescriptorBuilder
-
newChild
Description copied from interface:BodyDescriptorBuilder
Creates an instance ofBodyDescriptorBuilder
to 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:
newChild
in interfaceBodyDescriptorBuilder
-
build
Description copied from interface:BodyDescriptorBuilder
Builds an instance ofBodyDescriptor
based on the internal state.- Specified by:
build
in interfaceBodyDescriptorBuilder
-
addField
Should be called for eachContent-
header field of a MIME message or part.- Specified by:
addField
in interfaceBodyDescriptorBuilder
- Parameters:
field
- the MIME field.- Throws:
MimeException
-
parseContentType
- Throws:
MimeException
-