public abstract class XOPEncodingStreamWrapper extends java.lang.Object implements MimePartProvider
XOPEncodingStreamReader and XOPEncodingStreamWriter.| Modifier and Type | Field and Description |
|---|---|
private ContentIDGenerator |
contentIDGenerator |
private java.util.Map |
dataHandlerObjects |
private OptimizationPolicy |
optimizationPolicy |
| Constructor and Description |
|---|
XOPEncodingStreamWrapper(ContentIDGenerator contentIDGenerator,
OptimizationPolicy optimizationPolicy) |
| Modifier and Type | Method and Description |
|---|---|
private java.lang.String |
addDataHandler(java.lang.Object dataHandlerObject,
java.lang.String existingContentID) |
java.util.Set |
getContentIDs()
Get the set of content IDs referenced in xop:Include element information items
produced by this wrapper.
|
javax.activation.DataHandler |
getDataHandler(java.lang.String contentID)
Get the
DataHandler for the MIME part identified by a given content ID. |
boolean |
isLoaded(java.lang.String contentID)
Check whether the MIME part identified by a given content ID has already been loaded.
|
protected java.lang.String |
processDataHandler(DataHandlerProvider dataHandlerProvider,
java.lang.String existingContentID,
boolean optimize) |
protected java.lang.String |
processDataHandler(javax.activation.DataHandler dataHandler,
java.lang.String existingContentID,
boolean optimize) |
private final java.util.Map dataHandlerObjects
private final ContentIDGenerator contentIDGenerator
private final OptimizationPolicy optimizationPolicy
public XOPEncodingStreamWrapper(ContentIDGenerator contentIDGenerator, OptimizationPolicy optimizationPolicy)
private java.lang.String addDataHandler(java.lang.Object dataHandlerObject,
java.lang.String existingContentID)
protected java.lang.String processDataHandler(javax.activation.DataHandler dataHandler,
java.lang.String existingContentID,
boolean optimize)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String processDataHandler(DataHandlerProvider dataHandlerProvider, java.lang.String existingContentID, boolean optimize) throws java.io.IOException
java.io.IOExceptionpublic java.util.Set getContentIDs()
public boolean isLoaded(java.lang.String contentID)
MimePartProvidertrue means that a call to MimePartProvider.getDataHandler(String) (for
the same content ID) will not block or will retrieve the DataHandler without
overhead.isLoaded in interface MimePartProvidertrue if the MIME part has already been loaded; false
otherwisepublic javax.activation.DataHandler getDataHandler(java.lang.String contentID)
throws java.io.IOException
MimePartProviderDataHandler for the MIME part identified by a given content ID.getDataHandler in interface MimePartProvidercontentID - a content ID referenced in an xop:Include elementDataHandler for the MIME part identified by the content ID; may not be
nulljava.io.IOException - if an error occurred while loading the part