Package java.sql

Interface SQLXML


public interface SQLXML
Maps SQL's XML type into Java.
  • Method Summary

    Modifier and Type Method Description
    void free()
    Frees any resources held by this object.
    InputStream getBinaryStream()
    Returns a stream that can be used to read binary data from this SQL XML object.
    Reader getCharacterStream()
    Returns a reader that can be used to read character data from this SQL XML object.
    <T extends Source>
    T
    getSource​(Class<T> sourceClass)
    Returns a Source for reading this object's data.
    String getString()
    Returns this object's data as an XML string.
    OutputStream setBinaryStream()
    Returns a stream that can be used to write binary data to this SQL XML object.
    Writer setCharacterStream()
    Returns a writer that can be used to write character data to this SQL XML object.
    <T extends Result>
    T
    setResult​(Class<T> resultClass)
    Returns a Result for writing this object's data.
    void setString​(String value)
    Sets this object's data to the given XML string.
  • Method Details

    • free

      void free() throws SQLException
      Frees any resources held by this object. After free is called, calling method other than free will throw SQLException (calling free repeatedly will do nothing).
      Throws:
      SQLException
    • getBinaryStream

      InputStream getBinaryStream() throws SQLException
      Returns a stream that can be used to read binary data from this SQL XML object.
      Throws:
      SQLException - if an error occurs accessing the data
    • setBinaryStream

      OutputStream setBinaryStream() throws SQLException
      Returns a stream that can be used to write binary data to this SQL XML object.
      Throws:
      SQLException - if an error occurs accessing the data
    • getCharacterStream

      Reader getCharacterStream() throws SQLException
      Returns a reader that can be used to read character data from this SQL XML object.
      Throws:
      SQLException - if an error occurs accessing the data
    • setCharacterStream

      Writer setCharacterStream() throws SQLException
      Returns a writer that can be used to write character data to this SQL XML object.
      Throws:
      SQLException - if an error occurs accessing the data
    • getString

      String getString() throws SQLException
      Returns this object's data as an XML string.
      Throws:
      SQLException - if an error occurs accessing the data
    • setString

      void setString​(String value) throws SQLException
      Sets this object's data to the given XML string.
      Throws:
      SQLException - if an error occurs accessing the data
    • getSource

      <T extends Source> T getSource​(Class<T> sourceClass) throws SQLException
      Returns a Source for reading this object's data.
      Throws:
      SQLException - if an error occurs accessing the data
    • setResult

      <T extends Result> T setResult​(Class<T> resultClass) throws SQLException
      Returns a Result for writing this object's data.
      Throws:
      SQLException - if an error occurs accessing the data