public class TextFromElementDataSource extends Object implements 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 DataSourcepublic String getName()
getName in interface DataSourcepublic InputStream getInputStream() throws IOException
getInputStream in interface DataSourceIOExceptionpublic OutputStream getOutputStream() throws IOException
getOutputStream in interface DataSourceIOExceptionCopyright © 2004–2018 The Apache Software Foundation. All rights reserved.