org.apache.axiom.om.impl.builder
Class OMAttachmentAccessorMimePartProvider

java.lang.Object
  extended by org.apache.axiom.om.impl.builder.OMAttachmentAccessorMimePartProvider
All Implemented Interfaces:
MimePartProvider

public class OMAttachmentAccessorMimePartProvider
extends Object
implements MimePartProvider

Adapts an OMAttachmentAccessor instance to the MimePartProvider interface.


Constructor Summary
OMAttachmentAccessorMimePartProvider(OMAttachmentAccessor attachments)
           
 
Method Summary
 DataHandler getDataHandler(String contentID)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OMAttachmentAccessorMimePartProvider

public OMAttachmentAccessorMimePartProvider(OMAttachmentAccessor attachments)
Method Detail

isLoaded

public boolean isLoaded(String contentID)
Description copied from interface: MimePartProvider
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 MimePartProvider.getDataHandler(String) (for the same content ID) will not block or will retrieve the DataHandler without overhead.

Specified by:
isLoaded in interface MimePartProvider
Returns:
true if the MIME part has already been loaded; false otherwise

getDataHandler

public DataHandler getDataHandler(String contentID)
                           throws IOException
Description copied from interface: MimePartProvider
Get the DataHandler for the MIME part identified by a given content ID.

Specified by:
getDataHandler in interface MimePartProvider
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:
IOException - if an error occurred while loading the part


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.