Package org.apache.axiom.om.format.xop
Interface ContentTransferEncodingPolicy
- All Known Implementing Classes:
CombinedContentTransferEncodingPolicy
public interface ContentTransferEncodingPolicy
Determines the content transfer encoding to use for (non-root) MIME parts in an XOP package.
Note that in general, XOP encoded messages are sent over transport protocols that can handle
arbitrary sequences of bytes (such as HTTP), and the default
binary
or 8bit
encoding will work just fine. Therefore changing the content transfer encoding is only needed
in very specific use cases where the transport may not be able to handle arbitrary sequences
of bytes (such as SMTP).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContentTransferEncodingPolicy
Selects thebase64
content transfer encoding for parts that are not textual (as determined byContentType.isTextual()
. -
Method Summary
Modifier and TypeMethodDescriptiongetContentTransferEncoding
(Blob blob, ContentType contentType) Determine the content transfer encoding to use for a MIME part.
-
Field Details
-
USE_BASE64_FOR_NON_TEXTUAL_PARTS
Selects thebase64
content transfer encoding for parts that are not textual (as determined byContentType.isTextual()
.
-
-
Method Details
-
getContentTransferEncoding
Determine the content transfer encoding to use for a MIME part.- Parameters:
blob
- the content of the MIME part; may benull
contentType
- the content type of the MIME part (as determined byContentTypeProvider
; may benull
- Returns:
- the content transfer encoding, or
null
if no content transfer encoding is specified (in which case anotherContentTransferEncodingPolicy
may be consulted or a default is used)
-