Package org.apache.axis2.format
Class TextFromElementDataSource
java.lang.Object
org.apache.axis2.format.TextFromElementDataSource
- All Implemented Interfaces:
jakarta.activation.DataSource
Data source that represents the text of a given
OMElement.
The expression
new TextFromElementDataSource(element, charset, contentType)produces a DataSource implementation that is equivalent to
new ByteArrayDataSource(element.getText().getBytes(charset), contentType)but that is more efficient.
-
Constructor Summary
ConstructorsConstructorDescriptionTextFromElementDataSource(org.apache.axiom.om.OMElement element, String charset, String contentType) -
Method Summary
-
Constructor Details
-
TextFromElementDataSource
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein interfacejakarta.activation.DataSource
-
getName
- Specified by:
getNamein interfacejakarta.activation.DataSource
-
getInputStream
- Specified by:
getInputStreamin interfacejakarta.activation.DataSource- Throws:
IOException
-
getOutputStream
- Specified by:
getOutputStreamin interfacejakarta.activation.DataSource- Throws:
IOException
-