Package org.apache.axiom.om
Interface OMDataSource
-
- All Known Subinterfaces:
OMDataSourceExt
- All Known Implementing Classes:
ByteArrayDataSource,CharArrayDataSource,InputStreamDataSource,OMDataSourceExtBase,ParserInputStreamDataSource,WrappedTextNodeOMDataSourceFromDataSource,WrappedTextNodeOMDataSourceFromReader
public interface OMDataSourceInterface to arbitrary source of XML element data. This provides the hook for using a general data source (such as data binding frameworks) as the backing source of data for an element.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XMLStreamReadergetReader()Get parser for element data.voidserialize(OutputStream output, OMOutputFormat format)Serializes element data directly to stream.voidserialize(Writer writer, OMOutputFormat format)Serializes element data directly to writer.voidserialize(XMLStreamWriter xmlWriter)Serializes element data directly to StAX writer.
-
-
-
Method Detail
-
serialize
void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException
Serializes element data directly to stream.- Parameters:
output- destination stream for element XML textformat- Output format information. The implementation must use this information to choose the correct character set encoding when writing to the output stream. This parameter must not be null.- Throws:
XMLStreamException
-
serialize
void serialize(Writer writer, OMOutputFormat format) throws XMLStreamException
Serializes element data directly to writer.- Parameters:
writer- destination writer for element XML textformat- output format information (nullif none; may be ignored if not supported by data binding even if supplied)- Throws:
XMLStreamException
-
serialize
void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
Serializes element data directly to StAX writer.- Parameters:
xmlWriter- destination writer- Throws:
XMLStreamException
-
getReader
XMLStreamReader getReader() throws XMLStreamException
Get parser for element data. In the general case this may require the data source to serialize data as XML text and then parse that text.- Returns:
- element parser
- Throws:
XMLStreamException
-
-