oracle.xdb

## Class SQLXMLType

- java.lang.Object
- - oracle.sql.OPAQUE
  - - oracle.xdb.XMLType
    - - oracle.xdb.SQLXMLType

All Implemented Interfaces:
  java.sql.SQLXML

    public class SQLXMLType
    extends XMLType
    implements java.sql.SQLXML

### Field Summary

### Fields inherited from class oracle.xdb.XMLType

`_SQL_TYPECODE, CONNTYPE_KPRB, CONNTYPE_OCI8, CONNTYPE_THIN, DECODE_ON_CLIENT, DEF_INDENT, ENCODE_ON_CLIENT, MAX_INDENT, MAX_PFLAG, PRINT_DEFAULT_PROPERTY, PRINT_NOPRETTY, PRINT_PRETTY, XMLTYPE_PICKLE_AS_BINXML, XMLTYPE_PICKLE_AS_TEXT`

### Constructor Summary

Constructors
Constructor and Description
`SQLXMLType()`
`SQLXMLType(java.sql.Connection conn, java.io.InputStream is)`
`SQLXMLType(java.sql.Connection conn, java.io.InputStream is, java.lang.String kind)`
`SQLXMLType(java.sql.Connection conn, long cstate)`
`SQLXMLType(OpaqueDescriptor type, java.sql.Connection conn, java.lang.Object value)`
`SQLXMLType(OpaqueDescriptor type, java.sql.Connection conn, java.lang.Object value, java.lang.String kind)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `free()`
`java.io.InputStream` `getBinaryStream()` SQLXML method Get the value containing the XML data from the XMLType as a InputStream
`java.io.Reader` `getCharacterStream()` SQLXML method Get the value containing the XML data from the XMLType as a InputStream
`<T extends Source> T` `getSource(java.lang.Class<T> sourceClass)` SQLXML method Get the value containing the XML data from the XMLType as a InputStream
`java.lang.String` `getString()` SQLXML method Get the string value containing the XML data from the XMLType.
`java.io.OutputStream` `setBinaryStream()` SQLXML method Set the string value containing the XML data to the XMLType.
`java.io.Writer` `setCharacterStream()` SQLXML method Set the string value containing the XML data to the XMLType.
`<T extends Result> T` `setResult(java.lang.Class<T> resultClass)`
`void` `setString(java.lang.String str)` SQLXML method Set the string value containing the XML data to the XMLType.

### Methods inherited from class oracle.xdb.XMLType

`cleanupCache, close, createSchemaBasedXML, createXML, createXML, createXML, createXML, createXML, createXML, createXML, existsNode, extract, getBlobVal, getBlobVal, getClobVal, getClobVal, getDocument, getDocumentFragment, getDOM, getInputStream, getInputStream, getNamespace, getRootElement, getSchemaURL, getStringVal, getStringVal, isBinXml, isFragment, isSchemaBased, isSchemaValid, isSchemaValidated, schemaValidate, setBinaryXML, setBinaryXMLEncoding, setMetadataConn, setPicklePreference, setSchemaURL, setSchemaValidated, toBlob, toClob, transform, writeToOutputStream, writeToOutputStream`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SQLXMLType

    public SQLXMLType(java.sql.Connection conn,
                      java.io.InputStream is)
               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### SQLXMLType

    public SQLXMLType(java.sql.Connection conn,
                      java.io.InputStream is,
                      java.lang.String kind)
               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### SQLXMLType

    public SQLXMLType(OpaqueDescriptor type,
                      java.sql.Connection conn,
                      java.lang.Object value)
               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### SQLXMLType

    public SQLXMLType(OpaqueDescriptor type,
                      java.sql.Connection conn,
                      java.lang.Object value,
                      java.lang.String kind)
               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### SQLXMLType

    public SQLXMLType(java.sql.Connection conn,
                      long cstate)
               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### SQLXMLType

    public SQLXMLType()
               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

### Method Detail

#### free

    public void free()

Specified by:
  `free` in interface `java.sql.SQLXML`
Overrides:
  `free` in class `XMLType`

#### getString

    public java.lang.String getString()
                               throws java.sql.SQLException

SQLXML method Get the string value containing the XML data from the XMLType.

Specified by:
  `getString` in interface `java.sql.SQLXML`
Overrides:
  `getString` in class `XMLType`
Returns:
  the string containing the XML data bytes.
Throws:
  `java.sql.SQLException`

#### getBinaryStream

    public java.io.InputStream getBinaryStream()
                                        throws java.sql.SQLException

SQLXML method Get the value containing the XML data from the XMLType as a InputStream

Specified by:
  `getBinaryStream` in interface `java.sql.SQLXML`
Overrides:
  `getBinaryStream` in class `XMLType`
Returns:
  the InputStream containing the XML data bytes.
Throws:
  `java.sql.SQLException`

#### getCharacterStream

    public java.io.Reader getCharacterStream()
                                      throws java.sql.SQLException

SQLXML method Get the value containing the XML data from the XMLType as a InputStream

Specified by:
  `getCharacterStream` in interface `java.sql.SQLXML`
Overrides:
  `getCharacterStream` in class `XMLType`
Returns:
  the Reader containing the XML data bytes.
Throws:
  `java.sql.SQLException`

#### getSource

    public <T extends Source> T getSource(java.lang.Class<T> sourceClass)
                                   throws java.sql.SQLException

SQLXML method Get the value containing the XML data from the XMLType as a InputStream

Specified by:
  `getSource` in interface `java.sql.SQLXML`
Overrides:
  `getSource` in class `XMLType`
Returns:
  the Reader containing the XML data bytes.
Throws:
  `java.sql.SQLException`

#### setString

    public void setString(java.lang.String str)
                   throws java.sql.SQLException

SQLXML method Set the string value containing the XML data to the XMLType.

Specified by:
  `setString` in interface `java.sql.SQLXML`
Overrides:
  `setString` in class `XMLType`
Throws:
  `java.sql.SQLException`

#### setCharacterStream

    public java.io.Writer setCharacterStream()
                                      throws java.sql.SQLException

SQLXML method Set the string value containing the XML data to the XMLType.

Specified by:
  `setCharacterStream` in interface `java.sql.SQLXML`
Overrides:
  `setCharacterStream` in class `XMLType`
Throws:
  `java.sql.SQLException`

#### setBinaryStream

    public java.io.OutputStream setBinaryStream()
                                         throws java.sql.SQLException

SQLXML method Set the string value containing the XML data to the XMLType.

Specified by:
  `setBinaryStream` in interface `java.sql.SQLXML`
Overrides:
  `setBinaryStream` in class `XMLType`
Throws:
  `java.sql.SQLException`

#### setResult

    public <T extends Result> T setResult(java.lang.Class<T> resultClass)
                                   throws java.sql.SQLException

Specified by:
  `setResult` in interface `java.sql.SQLXML`
Overrides:
  `setResult` in class `XMLType`
Throws:
  `java.sql.SQLException`

Copyright © 2003, 2018, Oracle and/or its affiliates. All rights reserved.