src/share/classes/java/sql/SQLXML.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 172,182 ****
* <p>
* The state moves from readable to not readable once free() or any of the
* reading APIs are called: getBinaryStream(), getCharacterStream(), getSource(), and getString().
* Implementations may also change the state to not writable when this occurs.
* <p>
! * The state moves from writable to not writeable once free() or any of the
* writing APIs are called: setBinaryStream(), setCharacterStream(), setResult(), and setString().
* Implementations may also change the state to not readable when this occurs.
*
* <p>
* All methods on the <code>SQLXML</code> interface must be fully implemented if the
--- 172,182 ----
* <p>
* The state moves from readable to not readable once free() or any of the
* reading APIs are called: getBinaryStream(), getCharacterStream(), getSource(), and getString().
* Implementations may also change the state to not writable when this occurs.
* <p>
! * The state moves from writable to not writable once free() or any of the
* writing APIs are called: setBinaryStream(), setCharacterStream(), setResult(), and setString().
* Implementations may also change the state to not readable when this occurs.
*
* <p>
* All methods on the <code>SQLXML</code> interface must be fully implemented if the
*** 190,200 ****
*/
public interface SQLXML
{
/**
* This method closes this object and releases the resources that it held.
! * The SQL XML object becomes invalid and neither readable or writeable
* when this method is called.
*
* After <code>free</code> has been called, any attempt to invoke a
* method other than <code>free</code> will result in a <code>SQLException</code>
* being thrown. If <code>free</code> is called multiple times, the subsequent
--- 190,200 ----
*/
public interface SQLXML
{
/**
* This method closes this object and releases the resources that it held.
! * The SQL XML object becomes invalid and neither readable or writable
* when this method is called.
*
* After <code>free</code> has been called, any attempt to invoke a
* method other than <code>free</code> will result in a <code>SQLException</code>
* being thrown. If <code>free</code> is called multiple times, the subsequent
*** 229,239 ****
* The stream begins at position 0.
* The bytes of the stream are interpreted according to appendix F of the XML 1.0 specification
* The behavior of this method is the same as ResultSet.updateBinaryStream()
* when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
* <p>
! * The SQL XML object becomes not writeable when this method is called and
* may also become not readable depending on implementation.
*
* @return a stream to which data can be written.
* @throws SQLException if there is an error processing the XML value.
* An exception is thrown if the state is not writable.
--- 229,239 ----
* The stream begins at position 0.
* The bytes of the stream are interpreted according to appendix F of the XML 1.0 specification
* The behavior of this method is the same as ResultSet.updateBinaryStream()
* when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
* <p>
! * The SQL XML object becomes not writable when this method is called and
* may also become not readable depending on implementation.
*
* @return a stream to which data can be written.
* @throws SQLException if there is an error processing the XML value.
* An exception is thrown if the state is not writable.
*** 275,285 ****
* Although an encoding declaration other than unicode may be present,
* the encoding of the stream is unicode.
* The behavior of this method is the same as ResultSet.updateCharacterStream()
* when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
* <p>
! * The SQL XML object becomes not writeable when this method is called and
* may also become not readable depending on implementation.
*
* @return a stream to which data can be written.
* @throws SQLException if there is an error processing the XML value.
* The getCause() method of the exception may provide a more detailed exception, for example,
--- 275,285 ----
* Although an encoding declaration other than unicode may be present,
* the encoding of the stream is unicode.
* The behavior of this method is the same as ResultSet.updateCharacterStream()
* when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
* <p>
! * The SQL XML object becomes not writable when this method is called and
* may also become not readable depending on implementation.
*
* @return a stream to which data can be written.
* @throws SQLException if there is an error processing the XML value.
* The getCause() method of the exception may provide a more detailed exception, for example,
*** 323,333 ****
* Although an encoding declaration other than unicode may be present,
* the encoding of the String is unicode.
* The behavior of this method is the same as ResultSet.updateString()
* when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
* <p>
! * The SQL XML object becomes not writeable when this method is called and
* may also become not readable depending on implementation.
*
* @param value the XML value
* @throws SQLException if there is an error processing the XML value.
* The getCause() method of the exception may provide a more detailed exception, for example,
--- 323,333 ----
* Although an encoding declaration other than unicode may be present,
* the encoding of the String is unicode.
* The behavior of this method is the same as ResultSet.updateString()
* when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
* <p>
! * The SQL XML object becomes not writable when this method is called and
* may also become not readable depending on implementation.
*
* @param value the XML value
* @throws SQLException if there is an error processing the XML value.
* The getCause() method of the exception may provide a more detailed exception, for example,
*** 385,395 ****
/**
* Returns a Result for setting the XML value designated by this SQLXML instance.
* <p>
* The systemID of the Result is implementation dependent.
* <p>
! * The SQL XML object becomes not writeable when this method is called and
* may also become not readable depending on implementation.
* <p>
* Note that SAX is a callback architecture and the returned
* SAXResult has a content handler assigned that will receive the
* SAX events based on the contents of the XML. Call the content
--- 385,395 ----
/**
* Returns a Result for setting the XML value designated by this SQLXML instance.
* <p>
* The systemID of the Result is implementation dependent.
* <p>
! * The SQL XML object becomes not writable when this method is called and
* may also become not readable depending on implementation.
* <p>
* Note that SAX is a callback architecture and the returned
* SAXResult has a content handler assigned that will receive the
* SAX events based on the contents of the XML. Call the content