code: public synchronized InputStream getBinaryStream() throws SQLException {
  
          checkClosed();
          checkReadable();
  
          InputStream inputStream = getBinaryStreamImpl();
  
          setReadable(false);
          setWritable(false);
  
          return inputStream;
      }
docs: Retrieves the XML value designated by this SQLXML instance as a stream.
  The bytes of the input stream are interpreted according to appendix F of the XML 1.0 specification.
  The behavior of this method is the same as ResultSet.getBinaryStream()
  when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
  <p>
  The SQL XML object becomes not readable when this method is called and
  may also become not writable depending on implementation.
  
  @return a stream containing the XML data.
  @throws SQLException if there is an error processing the XML value.
  An exception is thrown if the state is not readable.
  @exception SQLFeatureNotSupportedException if the JDBC driver does not support
  this method
  @since JDK 1.6