Package org.apache.axiom.util.stax.xop
Class XOPEncodingStreamWrapper
- java.lang.Object
-
- org.apache.axiom.util.stax.xop.XOPEncodingStreamWrapper
-
- All Implemented Interfaces:
MimePartProvider
- Direct Known Subclasses:
XOPEncodingStreamReader,XOPEncodingStreamWriter
public abstract class XOPEncodingStreamWrapper extends Object implements MimePartProvider
Base class forXOPEncodingStreamReaderandXOPEncodingStreamWriter.
-
-
Constructor Summary
Constructors Constructor Description XOPEncodingStreamWrapper(ContentIDGenerator contentIDGenerator, OptimizationPolicy optimizationPolicy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SetgetContentIDs()Get the set of content IDs referenced in xop:Include element information items produced by this wrapper.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.protected StringprocessDataHandler(DataHandler dataHandler, String existingContentID, boolean optimize)protected StringprocessDataHandler(DataHandlerProvider dataHandlerProvider, String existingContentID, boolean optimize)
-
-
-
Constructor Detail
-
XOPEncodingStreamWrapper
public XOPEncodingStreamWrapper(ContentIDGenerator contentIDGenerator, OptimizationPolicy optimizationPolicy)
-
-
Method Detail
-
processDataHandler
protected String processDataHandler(DataHandler dataHandler, String existingContentID, boolean optimize) throws IOException
- Throws:
IOException
-
processDataHandler
protected String processDataHandler(DataHandlerProvider dataHandlerProvider, String existingContentID, boolean optimize) throws IOException
- Throws:
IOException
-
getContentIDs
public Set getContentIDs()
Get the set of content IDs referenced in xop:Include element information items produced by this wrapper.- Returns:
- The set of content IDs in their order of appearance in the infoset. If no xop:Include element information items have been produced yet, an empty set will be returned.
-
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
-
-