Package org.teiid.core.types
Class SQLXMLImpl
- java.lang.Object
-
- org.teiid.core.types.BaseLob
-
- org.teiid.core.types.SQLXMLImpl
-
- All Implemented Interfaces:
Externalizable
,Serializable
,SQLXML
,InputStreamFactory.StreamFactoryReference
- Direct Known Subclasses:
StAXSQLXML
public class SQLXMLImpl extends BaseLob implements SQLXML
Default SQLXML impl NOTE that this representation of XML does not become unreadable after read operations.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SQLXMLImpl()
SQLXMLImpl(byte[] bytes)
Constructs a SQLXML from bytes that are already encoded inStreamable.ENCODING
SQLXMLImpl(String str)
SQLXMLImpl(InputStreamFactory factory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Charset
getCharset()
<T extends Source>
TgetSource(Class<T> sourceClass)
String
getString()
static long
quickLength(SQLXML xml)
For a given blob try to determine the length without fully reading an inputstreamOutputStream
setBinaryStream()
Writer
setCharacterStream()
<T extends Result>
TsetResult(Class<T> resultClass)
void
setString(String value)
-
Methods inherited from class org.teiid.core.types.BaseLob
free, getBinaryStream, getCharacterStream, getStreamFactory, length, readExternal, setCharset, setEncoding, setStreamFactory, writeExternal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.SQLXML
free, getBinaryStream, getCharacterStream
-
-
-
-
Constructor Detail
-
SQLXMLImpl
public SQLXMLImpl()
-
SQLXMLImpl
public SQLXMLImpl(byte[] bytes)
Constructs a SQLXML from bytes that are already encoded inStreamable.ENCODING
- Parameters:
bytes
-
-
SQLXMLImpl
public SQLXMLImpl(String str)
-
SQLXMLImpl
public SQLXMLImpl(InputStreamFactory factory)
-
-
Method Detail
-
getCharset
public Charset getCharset()
- Overrides:
getCharset
in classBaseLob
-
getSource
public <T extends Source> T getSource(Class<T> sourceClass) throws SQLException
- Specified by:
getSource
in interfaceSQLXML
- Throws:
SQLException
-
getString
public String getString() throws SQLException
- Specified by:
getString
in interfaceSQLXML
- Throws:
SQLException
-
setBinaryStream
public OutputStream setBinaryStream() throws SQLException
- Specified by:
setBinaryStream
in interfaceSQLXML
- Throws:
SQLException
-
setCharacterStream
public Writer setCharacterStream() throws SQLException
- Specified by:
setCharacterStream
in interfaceSQLXML
- Throws:
SQLException
-
setString
public void setString(String value) throws SQLException
- Specified by:
setString
in interfaceSQLXML
- Throws:
SQLException
-
setResult
public <T extends Result> T setResult(Class<T> resultClass) throws SQLException
- Specified by:
setResult
in interfaceSQLXML
- Throws:
SQLException
-
quickLength
public static long quickLength(SQLXML xml)
For a given blob try to determine the length without fully reading an inputstream- Returns:
- the length or -1 if it cannot be determined
-
-