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 Details

  • 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)