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
Base class for
XOPEncodingStreamReader and XOPEncodingStreamWriter.-
Constructor Summary
ConstructorsConstructorDescriptionXOPEncodingStreamWrapper(ContentIDGenerator contentIDGenerator, OptimizationPolicy optimizationPolicy) -
Method Summary
Modifier and TypeMethodDescriptionGet the set of content IDs referenced in xop:Include element information items produced by this wrapper.getDataHandler(String contentID) Get theDataHandlerfor the MIME part identified by a given content ID.booleanCheck 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 Details
-
XOPEncodingStreamWrapper
public XOPEncodingStreamWrapper(ContentIDGenerator contentIDGenerator, OptimizationPolicy optimizationPolicy)
-
-
Method Details
-
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
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
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
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
-