Package org.apache.axiom.util.stax.xop
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 TypeMethodDescriptiongetDataHandler(String contentID) Get theDataHandlerfor the MIME part identified by a given content ID.booleanCheck whether the MIME part identified by a given content ID has already been loaded.
-
Method Details
-
isLoaded
Check whether the MIME part identified by a given content ID has already been loaded. A return value oftruemeans that a call togetDataHandler(String)(for the same content ID) will not block or will retrieve theDataHandlerwithout overhead.- Returns:
trueif the MIME part has already been loaded;falseotherwise- 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 returnfalse.
-
getDataHandler
Get theDataHandlerfor the MIME part identified by a given content ID.- Parameters:
contentID- a content ID referenced in an xop:Include element- Returns:
- the
DataHandlerfor the MIME part identified by the content ID; may not benull - Throws:
IllegalArgumentException- if the MIME part was not foundIOException- if an error occurred while loading the part
-