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

  Fields
  Modifier and Type
  Field
  Description
  `static final ContentTransferEncodingPolicy`
  `USE_BASE64_FOR_NON_TEXTUAL_PARTS`
  Selects the `base64` content transfer encoding for parts that are not textual (as determined by `ContentType.isTextual()`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ContentTransferEncoding`
  `getContentTransferEncoding(Blob blob, ContentType contentType)`
  Determine the content transfer encoding to use for a MIME part.

- ## Field Details

  - ### USE_BASE64_FOR_NON_TEXTUAL_PARTS

    static final ContentTransferEncodingPolicy USE_BASE64_FOR_NON_TEXTUAL_PARTS
    Selects the `base64` content transfer encoding for parts that are not textual (as determined by `ContentType.isTextual()`.

- ## Method Details

  - ### getContentTransferEncoding

    ContentTransferEncoding getContentTransferEncoding(Blob blob, ContentType contentType)
    Determine the content transfer encoding to use for a MIME part.
    Parameters:
      `blob` - the content of the MIME part; may be `null`
      `contentType` - the content type of the MIME part (as determined by `ContentTypeProvider`; may be `null`
    Returns:
      the content transfer encoding, or `null` if no content transfer encoding is specified (in which case another `ContentTransferEncodingPolicy` may be consulted or a default is used)