Interface MimePartProvider

All Known Implementing Classes:
OMAttachmentAccessorMimePartProvider, XOPEncodingStreamReader, XOPEncodingStreamWrapper, XOPEncodingStreamWriter

public interface MimePartProvider
Interface used by XOPDecodingStreamReader to load MIME parts referenced by xop:Include elements.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the DataHandler for the MIME part identified by a given content ID.
    boolean
    isLoaded(String contentID)
    Check whether the MIME part identified by a given content ID has already been loaded.
  • Method Details

    • isLoaded

      boolean isLoaded(String contentID)
      Check whether the MIME part identified by a given content ID has already been loaded. A return value of true means that a call to getDataHandler(String) (for the same content ID) will not block or will retrieve the DataHandler without overhead.
      Returns:
      true if the MIME part has already been loaded; false otherwise
      Throws:
      IllegalArgumentException - Thrown if the MIME part specified by the content ID doesn't exist. Note that the implementation may be unable to determine this without loading all the MIME parts. In this case, it should return false.
    • getDataHandler

      DataHandler getDataHandler(String contentID) throws IOException
      Get the DataHandler for the MIME part identified by a given content ID.
      Parameters:
      contentID - a content ID referenced in an xop:Include element
      Returns:
      the DataHandler for the MIME part identified by the content ID; may not be null
      Throws:
      IllegalArgumentException - if the MIME part was not found
      IOException - if an error occurred while loading the part