Package org.apache.axiom.util.stax.xop
Interface MimePartProvider
-
- All Known Implementing Classes:
OMAttachmentAccessorMimePartProvider,XOPEncodingStreamReader,XOPEncodingStreamWrapper,XOPEncodingStreamWriter
public interface MimePartProviderInterface used byXOPDecodingStreamReaderto load MIME parts referenced by xop:Include elements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataHandlergetDataHandler(String contentID)Get theDataHandlerfor the MIME part identified by a given content ID.booleanisLoaded(String contentID)Check whether the MIME part identified by a given content ID has already been loaded.
-
-
-
Method Detail
-
isLoaded
boolean isLoaded(String contentID)
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
DataHandler getDataHandler(String contentID) throws IOException
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
-
-