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 DataSource
public String getName()
getName
in interface DataSource
public InputStream getInputStream() throws IOException
getInputStream
in interface DataSource
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface DataSource
IOException
Copyright © 2004–2018 The Apache Software Foundation. All rights reserved.