0N/A/*
2828N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage javax.sql.rowset.serial;
0N/A
0N/Aimport java.sql.*;
0N/Aimport javax.sql.*;
0N/Aimport java.io.*;
0N/Aimport java.lang.String;
0N/Aimport java.math.*;
0N/Aimport java.util.Map;
0N/Aimport java.util.Vector;
0N/A
0N/A/**
0N/A * The output stream for writing the attributes of a
0N/A * custom-mapped user-defined type (UDT) back to the database.
0N/A * The driver uses this interface internally, and its
0N/A * methods are never directly invoked by an application programmer.
0N/A * <p>
0N/A * When an application calls the
0N/A * method <code>PreparedStatement.setObject</code>, the driver
0N/A * checks to see whether the value to be written is a UDT with
0N/A * a custom mapping. If it is, there will be an entry in a
0N/A * type map containing the <code>Class</code> object for the
0N/A * class that implements <code>SQLData</code> for this UDT.
0N/A * If the value to be written is an instance of <code>SQLData</code>,
0N/A * the driver will create an instance of <code>SQLOutputImpl</code>
0N/A * and pass it to the method <code>SQLData.writeSQL</code>.
0N/A * The method <code>writeSQL</code> in turn calls the
0N/A * appropriate <code>SQLOutputImpl.writeXXX</code> methods
0N/A * to write data from the <code>SQLData</code> object to
0N/A * the <code>SQLOutputImpl</code> output stream as the
0N/A * representation of an SQL user-defined type.
0N/A */
0N/Apublic class SQLOutputImpl implements SQLOutput {
0N/A
0N/A /**
0N/A * A reference to an existing vector that
0N/A * contains the attributes of a <code>Struct</code> object.
0N/A */
0N/A private Vector attribs;
0N/A
0N/A /**
0N/A * The type map the driver supplies to a newly created
0N/A * <code>SQLOutputImpl</code> object. This type map
0N/A * indicates the <code>SQLData</code> class whose
0N/A * <code>writeSQL</code> method will be called. This
0N/A * method will in turn call the appropriate
0N/A * <code>SQLOutputImpl</code> writer methods.
0N/A */
0N/A private Map map;
0N/A
0N/A /**
0N/A * Creates a new <code>SQLOutputImpl</code> object
0N/A * initialized with the given vector of attributes and
0N/A * type map. The driver will use the type map to determine
0N/A * which <code>SQLData.writeSQL</code> method to invoke.
0N/A * This method will then call the appropriate
0N/A * <code>SQLOutputImpl</code> writer methods in order and
0N/A * thereby write the attributes to the new output stream.
0N/A *
0N/A * @param attributes a <code>Vector</code> object containing the attributes of
0N/A * the UDT to be mapped to one or more objects in the Java
0N/A * programming language
0N/A *
0N/A * @param map a <code>java.util.Map</code> object containing zero or
0N/A * more entries, with each entry consisting of 1) a <code>String</code>
0N/A * giving the fully qualified name of a UDT and 2) the
0N/A * <code>Class</code> object for the <code>SQLData</code> implementation
0N/A * that defines how the UDT is to be mapped
0N/A * @throws SQLException if the <code>attributes</code> or the <code>map</code>
0N/A * is a <code>null</code> value
0N/A */
0N/A public SQLOutputImpl(Vector<?> attributes, Map<String,?> map)
0N/A throws SQLException
0N/A {
0N/A if ((attributes == null) || (map == null)) {
0N/A throw new SQLException("Cannot instantiate a SQLOutputImpl " +
0N/A "instance with null parameters");
0N/A }
0N/A this.attribs = attributes;
0N/A this.map = map;
0N/A }
0N/A
0N/A //================================================================
0N/A // Methods for writing attributes to the stream of SQL data.
0N/A // These methods correspond to the column-accessor methods of
0N/A // java.sql.ResultSet.
0N/A //================================================================
0N/A
0N/A /**
0N/A * Writes a <code>String</code> in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>CHAR</code>, <code>VARCHAR</code>, or
0N/A * <code>LONGVARCHAR</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeString(String x) throws SQLException {
0N/A //System.out.println("Adding :"+x);
0N/A attribs.add(x);
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>boolean</code> in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>BIT</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeBoolean(boolean x) throws SQLException {
2828N/A attribs.add(Boolean.valueOf(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>byte</code> in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>BIT</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeByte(byte x) throws SQLException {
2828N/A attribs.add(Byte.valueOf(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>short</code> in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>SMALLINT</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeShort(short x) throws SQLException {
2828N/A attribs.add(Short.valueOf(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes an <code>int</code> in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>INTEGER</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeInt(int x) throws SQLException {
2828N/A attribs.add(Integer.valueOf(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>long</code> in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>BIGINT</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeLong(long x) throws SQLException {
2828N/A attribs.add(Long.valueOf(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>float</code> in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>REAL</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeFloat(float x) throws SQLException {
0N/A attribs.add(new Float(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>double</code> in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>DOUBLE</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeDouble(double x) throws SQLException{
0N/A attribs.add(new Double(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>java.math.BigDecimal</code> object in the Java programming
0N/A * language to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>NUMERIC</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeBigDecimal(java.math.BigDecimal x) throws SQLException{
0N/A attribs.add(x);
0N/A }
0N/A
0N/A /**
0N/A * Writes an array of <code>bytes</code> in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>VARBINARY</code> or <code>LONGVARBINARY</code>
0N/A * before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeBytes(byte[] x) throws SQLException {
0N/A attribs.add(x);
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>java.sql.Date</code> object in the Java programming
0N/A * language to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>DATE</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeDate(java.sql.Date x) throws SQLException {
0N/A attribs.add(x);
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>java.sql.Time</code> object in the Java programming
0N/A * language to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>TIME</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeTime(java.sql.Time x) throws SQLException {
0N/A attribs.add(x);
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>java.sql.Timestamp</code> object in the Java programming
0N/A * language to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to an SQL <code>TIMESTAMP</code> before returning it to the database.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeTimestamp(java.sql.Timestamp x) throws SQLException {
0N/A attribs.add(x);
0N/A }
0N/A
0N/A /**
0N/A * Writes a stream of Unicode characters to this
0N/A * <code>SQLOutputImpl</code> object. The driver will do any necessary
0N/A * conversion from Unicode to the database <code>CHAR</code> format.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeCharacterStream(java.io.Reader x) throws SQLException {
0N/A BufferedReader bufReader = new BufferedReader(x);
0N/A try {
0N/A int i;
0N/A while( (i = bufReader.read()) != -1 ) {
0N/A char ch = (char)i;
0N/A StringBuffer strBuf = new StringBuffer();
0N/A strBuf.append(ch);
0N/A
0N/A String str = new String(strBuf);
0N/A String strLine = bufReader.readLine();
0N/A
0N/A writeString(str.concat(strLine));
0N/A }
0N/A } catch(IOException ioe) {
0N/A
0N/A }
0N/A }
0N/A
0N/A /**
0N/A * Writes a stream of ASCII characters to this
0N/A * <code>SQLOutputImpl</code> object. The driver will do any necessary
0N/A * conversion from ASCII to the database <code>CHAR</code> format.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeAsciiStream(java.io.InputStream x) throws SQLException {
0N/A BufferedReader bufReader = new BufferedReader(new InputStreamReader(x));
0N/A try {
0N/A int i;
0N/A while( (i=bufReader.read()) != -1 ) {
0N/A char ch = (char)i;
0N/A
0N/A StringBuffer strBuf = new StringBuffer();
0N/A strBuf.append(ch);
0N/A
0N/A String str = new String(strBuf);
0N/A String strLine = bufReader.readLine();
0N/A
0N/A writeString(str.concat(strLine));
0N/A }
0N/A }catch(IOException ioe) {
0N/A throw new SQLException(ioe.getMessage());
0N/A }
0N/A }
0N/A
0N/A /**
0N/A * Writes a stream of uninterpreted bytes to this <code>SQLOutputImpl</code>
0N/A * object.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeBinaryStream(java.io.InputStream x) throws SQLException {
0N/A BufferedReader bufReader = new BufferedReader(new InputStreamReader(x));
0N/A try {
0N/A int i;
0N/A while( (i=bufReader.read()) != -1 ) {
0N/A char ch = (char)i;
0N/A
0N/A StringBuffer strBuf = new StringBuffer();
0N/A strBuf.append(ch);
0N/A
0N/A String str = new String(strBuf);
0N/A String strLine = bufReader.readLine();
0N/A
0N/A writeString(str.concat(strLine));
0N/A }
0N/A } catch(IOException ioe) {
0N/A throw new SQLException(ioe.getMessage());
0N/A }
0N/A }
0N/A
0N/A //================================================================
0N/A // Methods for writing items of SQL user-defined types to the stream.
0N/A // These methods pass objects to the database as values of SQL
0N/A // Structured Types, Distinct Types, Constructed Types, and Locator
0N/A // Types. They decompose the Java object(s) and write leaf data
0N/A // items using the methods above.
0N/A //================================================================
0N/A
0N/A /**
0N/A * Writes to the stream the data contained in the given
0N/A * <code>SQLData</code> object.
0N/A * When the <code>SQLData</code> object is <code>null</code>, this
0N/A * method writes an SQL <code>NULL</code> to the stream.
0N/A * Otherwise, it calls the <code>SQLData.writeSQL</code>
0N/A * method of the given object, which
0N/A * writes the object's attributes to the stream.
0N/A * <P>
0N/A * The implementation of the method <code>SQLData.writeSQ</code>
0N/A * calls the appropriate <code>SQLOutputImpl.writeXXX</code> method(s)
0N/A * for writing each of the object's attributes in order.
0N/A * The attributes must be read from an <code>SQLInput</code>
0N/A * input stream and written to an <code>SQLOutputImpl</code>
0N/A * output stream in the same order in which they were
0N/A * listed in the SQL definition of the user-defined type.
0N/A *
0N/A * @param x the object representing data of an SQL structured or
0N/A * distinct type
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeObject(SQLData x) throws SQLException {
0N/A
0N/A /*
0N/A * Except for the types that are passed as objects
0N/A * this seems to be the only way for an object to
0N/A * get a null value for a field in a structure.
0N/A *
0N/A * Note: this means that the class defining SQLData
0N/A * will need to track if a field is SQL null for itself
0N/A */
0N/A if (x == null) {
0N/A attribs.add(x);
0N/A return;
0N/A }
0N/A
0N/A /*
0N/A * We have to write out a SerialStruct that contains
0N/A * the name of this class otherwise we don't know
0N/A * what to re-instantiate during readSQL()
0N/A */
0N/A attribs.add(new SerialStruct((SQLData)x, map));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>Ref</code> object in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to a serializable <code>SerialRef</code> SQL <code>REF</code> value
0N/A * before returning it to the database.
0N/A *
0N/A * @param x an object representing an SQL <code>REF</code> value
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeRef(Ref x) throws SQLException {
0N/A if (x == null) {
0N/A attribs.add(x);
0N/A return;
0N/A }
0N/A attribs.add(new SerialRef(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>Blob</code> object in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to a serializable <code>SerialBlob</code> SQL <code>BLOB</code> value
0N/A * before returning it to the database.
0N/A *
0N/A * @param x an object representing an SQL <code>BLOB</code> value
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeBlob(Blob x) throws SQLException {
0N/A if (x == null) {
0N/A attribs.add(x);
0N/A return;
0N/A }
0N/A attribs.add(new SerialBlob(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>Clob</code> object in the Java programming language
0N/A * to this <code>SQLOutputImpl</code> object. The driver converts
0N/A * it to a serializable <code>SerialClob</code> SQL <code>CLOB</code> value
0N/A * before returning it to the database.
0N/A *
0N/A * @param x an object representing an SQL <code>CLOB</code> value
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeClob(Clob x) throws SQLException {
0N/A if (x == null) {
0N/A attribs.add(x);
0N/A return;
0N/A }
0N/A attribs.add(new SerialClob(x));
0N/A }
0N/A
0N/A /**
0N/A * Writes a <code>Struct</code> object in the Java
0N/A * programming language to this <code>SQLOutputImpl</code>
0N/A * object. The driver converts this value to an SQL structured type
0N/A * before returning it to the database.
0N/A * <P>
0N/A * This method should be used when an SQL structured type has been
0N/A * mapped to a <code>Struct</code> object in the Java programming
0N/A * language (the standard mapping). The method
0N/A * <code>writeObject</code> should be used if an SQL structured type
0N/A * has been custom mapped to a class in the Java programming language.
0N/A *
0N/A * @param x an object representing the attributes of an SQL structured type
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeStruct(Struct x) throws SQLException {
0N/A SerialStruct s = new SerialStruct(x,map);;
0N/A attribs.add(s);
0N/A }
0N/A
0N/A /**
0N/A * Writes an <code>Array</code> object in the Java
0N/A * programming language to this <code>SQLOutputImpl</code>
0N/A * object. The driver converts this value to a serializable
0N/A * <code>SerialArray</code> SQL <code>ARRAY</code>
0N/A * value before returning it to the database.
0N/A *
0N/A * @param x an object representing an SQL <code>ARRAY</code> value
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeArray(Array x) throws SQLException {
0N/A if (x == null) {
0N/A attribs.add(x);
0N/A return;
0N/A }
0N/A attribs.add(new SerialArray(x, map));
0N/A }
0N/A
0N/A /**
0N/A * Writes an <code>java.sql.Type.DATALINK</code> object in the Java
0N/A * programming language to this <code>SQLOutputImpl</code> object. The
0N/A * driver converts this value to a serializable <code>SerialDatalink</code>
0N/A * SQL <code>DATALINK</code> value before return it to the database.
0N/A *
0N/A * @param url an object representing a SQL <code>DATALINK</code> value
0N/A * @throws SQLException if the <code>SQLOutputImpl</code> object is in
0N/A * use by a <code>SQLData</code> object attempting to write the attribute
0N/A * values of a UDT to the database.
0N/A */
0N/A public void writeURL(java.net.URL url) throws SQLException {
0N/A if (url == null) {
0N/A attribs.add(url);
0N/A return;
0N/A }
0N/A attribs.add(new SerialDatalink(url));
0N/A
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Writes the next attribute to the stream as a <code>String</code>
0N/A * in the Java programming language. The driver converts this to a
0N/A * SQL <code>NCHAR</code> or
0N/A * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
0N/A * (depending on the argument's
0N/A * size relative to the driver's limits on <code>NVARCHAR</code> values)
0N/A * when it sends it to the stream.
0N/A *
0N/A * @param x the value to pass to the database
0N/A * @exception SQLException if a database access error occurs
0N/A * @since 1.6
0N/A */
0N/A public void writeNString(String x) throws SQLException {
0N/A throw new UnsupportedOperationException("Operation not supported");
0N/A }
0N/A
0N/A /**
0N/A * Writes an SQL <code>NCLOB</code> value to the stream.
0N/A *
0N/A * @param x a <code>NClob</code> object representing data of an SQL
0N/A * <code>NCLOB</code> value
0N/A *
0N/A * @exception SQLException if a database access error occurs
0N/A * @since 1.6
0N/A */
0N/A public void writeNClob(NClob x) throws SQLException {
0N/A throw new UnsupportedOperationException("Operation not supported");
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Writes an SQL <code>ROWID</code> value to the stream.
0N/A *
0N/A * @param x a <code>RowId</code> object representing data of an SQL
0N/A * <code>ROWID</code> value
0N/A *
0N/A * @exception SQLException if a database access error occurs
0N/A * @since 1.6
0N/A */
0N/A public void writeRowId(RowId x) throws SQLException {
0N/A throw new UnsupportedOperationException("Operation not supported");
0N/A }
0N/A
0N/A
0N/A /**
0N/A * Writes an SQL <code>XML</code> value to the stream.
0N/A *
0N/A * @param x a <code>SQLXML</code> object representing data of an SQL
0N/A * <code>XML</code> value
0N/A *
0N/A * @exception SQLException if a database access error occurs
0N/A * @since 1.6
0N/A */
0N/A public void writeSQLXML(SQLXML x) throws SQLException {
0N/A throw new UnsupportedOperationException("Operation not supported");
0N/A }
0N/A
0N/A}