Package org.apache.axiom.om.ds
Class OMDataSourceExtBase
java.lang.Object
org.apache.axiom.om.ds.OMDataSourceExtBase
- All Implemented Interfaces:
OMDataSource,OMDataSourceExt
- Direct Known Subclasses:
ByteArrayDataSource,CharArrayDataSource,InputStreamDataSource,ParserInputStreamDataSource,WrappedTextNodeOMDataSourceFromDataSource,WrappedTextNodeOMDataSourceFromReader
OMDataSourceExtBase is a convenient base class that can be extended
by other OMDataSourceExt implementations.
-
Field Summary
Fields inherited from interface org.apache.axiom.om.OMDataSourceExt
LOSSY_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProperty(String key) Query a property stored on the OMDataSourcegetXMLInputStream(String encoding) Returns a InputStream representing the xml databooleanhasProperty(String key) Returns true if property is setvoidserialize(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.setProperty(String key, Object value) Set a property on the OMDataSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.axiom.om.OMDataSourceExt
close, copy, getObject, getReader, getXMLBytes, isDestructiveRead, isDestructiveWrite
-
Constructor Details
-
OMDataSourceExtBase
public OMDataSourceExtBase()
-
-
Method Details
-
getProperty
Description copied from interface:OMDataSourceExtQuery a property stored on the OMDataSource- Specified by:
getPropertyin interfaceOMDataSourceExt- Parameters:
key-- Returns:
- value or null
-
setProperty
Description copied from interface:OMDataSourceExtSet a property on the OMDataSource- Specified by:
setPropertyin interfaceOMDataSourceExt- Parameters:
key-value-- Returns:
- old property object or null
-
hasProperty
Description copied from interface:OMDataSourceExtReturns true if property is set- Specified by:
hasPropertyin interfaceOMDataSourceExt- Parameters:
key-- Returns:
- TODO
-
getXMLInputStream
Description copied from interface:OMDataSourceExtReturns a InputStream representing the xml data- Specified by:
getXMLInputStreamin interfaceOMDataSourceExt- Parameters:
encoding- String encoding of InputStream- Returns:
- InputStream
- Throws:
UnsupportedEncodingException
-
serialize
Description copied from interface:OMDataSourceExtSerializes element data directly to stream. Assumes that the backing object is destroyed during serialization if isDestructiveWrite- Specified by:
serializein interfaceOMDataSource- Specified by:
serializein interfaceOMDataSourceExt- 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- See Also:
-
serialize
Description copied from interface:OMDataSourceExtSerializes element data directly to writer. Assumes that the backing object is destroyed during serialization isDestructiveWrite- Specified by:
serializein interfaceOMDataSource- Specified by:
serializein interfaceOMDataSourceExt- 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- See Also:
-
serialize
Description copied from interface:OMDataSourceExtSerializes element data directly to StAX writer. Assumes that the backing object is destroyed during serialization isDestructiveWrite- Specified by:
serializein interfaceOMDataSource- Specified by:
serializein interfaceOMDataSourceExt- Parameters:
xmlWriter- destination writer- Throws:
XMLStreamException- See Also:
-