public class TextFromElementDataSource extends Object implements javax.activation.DataSource
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 and Description |
|---|
TextFromElementDataSource(org.apache.axiom.om.OMElement element,
String charset,
String contentType) |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType() |
InputStream |
getInputStream() |
String |
getName() |
OutputStream |
getOutputStream() |
public String getContentType()
getContentType in interface javax.activation.DataSourcepublic String getName()
getName in interface javax.activation.DataSourcepublic InputStream getInputStream() throws IOException
getInputStream in interface javax.activation.DataSourceIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface javax.activation.DataSourceIOExceptionCopyright © 2004–2016 The Apache Software Foundation. All rights reserved.