Package org.apache.axiom.om.impl.builder
Class OMAttachmentAccessorMimePartProvider
- java.lang.Object
-
- org.apache.axiom.om.impl.builder.OMAttachmentAccessorMimePartProvider
-
- All Implemented Interfaces:
MimePartProvider
public class OMAttachmentAccessorMimePartProvider extends Object implements MimePartProvider
Adapts anOMAttachmentAccessorinstance to theMimePartProviderinterface.
-
-
Constructor Summary
Constructors Constructor Description OMAttachmentAccessorMimePartProvider(OMAttachmentAccessor attachments)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
OMAttachmentAccessorMimePartProvider
public OMAttachmentAccessorMimePartProvider(OMAttachmentAccessor attachments)
-
-
Method Detail
-
isLoaded
public boolean isLoaded(String contentID)
Description copied from interface:MimePartProviderCheck whether the MIME part identified by a given content ID has already been loaded. A return value oftruemeans that a call toMimePartProvider.getDataHandler(String)(for the same content ID) will not block or will retrieve theDataHandlerwithout overhead.- Specified by:
isLoadedin interfaceMimePartProvider- Returns:
trueif the MIME part has already been loaded;falseotherwise
-
getDataHandler
public DataHandler getDataHandler(String contentID) throws IOException
Description copied from interface:MimePartProviderGet theDataHandlerfor the MIME part identified by a given content ID.- Specified by:
getDataHandlerin interfaceMimePartProvider- 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:
IOException- if an error occurred while loading the part
-
-