jdk/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java
changeset 6697 39929804f9d4
parent 5506 202f599c92aa
child 11129 f9ad1aadf3fa
equal deleted inserted replaced
6696:7201f23dae0d 6697:39929804f9d4
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   135      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   135      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   136      *        use by a <code>SQLData</code> object attempting to write the attribute
   136      *        use by a <code>SQLData</code> object attempting to write the attribute
   137      *        values of a UDT to the database.
   137      *        values of a UDT to the database.
   138      */
   138      */
   139     public void writeBoolean(boolean x) throws SQLException {
   139     public void writeBoolean(boolean x) throws SQLException {
   140         attribs.add(new Boolean(x));
   140         attribs.add(Boolean.valueOf(x));
   141     }
   141     }
   142 
   142 
   143     /**
   143     /**
   144      * Writes a <code>byte</code> in the Java programming language
   144      * Writes a <code>byte</code> in the Java programming language
   145      * to this <code>SQLOutputImpl</code> object. The driver converts
   145      * to this <code>SQLOutputImpl</code> object. The driver converts
   149      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   149      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   150      *        use by a <code>SQLData</code> object attempting to write the attribute
   150      *        use by a <code>SQLData</code> object attempting to write the attribute
   151      *        values of a UDT to the database.
   151      *        values of a UDT to the database.
   152      */
   152      */
   153     public void writeByte(byte x) throws SQLException {
   153     public void writeByte(byte x) throws SQLException {
   154         attribs.add(new Byte(x));
   154         attribs.add(Byte.valueOf(x));
   155     }
   155     }
   156 
   156 
   157     /**
   157     /**
   158      * Writes a <code>short</code> in the Java programming language
   158      * Writes a <code>short</code> in the Java programming language
   159      * to this <code>SQLOutputImpl</code> object. The driver converts
   159      * to this <code>SQLOutputImpl</code> object. The driver converts
   163      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   163      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   164      *        use by a <code>SQLData</code> object attempting to write the attribute
   164      *        use by a <code>SQLData</code> object attempting to write the attribute
   165      *        values of a UDT to the database.
   165      *        values of a UDT to the database.
   166      */
   166      */
   167     public void writeShort(short x) throws SQLException {
   167     public void writeShort(short x) throws SQLException {
   168         attribs.add(new Short(x));
   168         attribs.add(Short.valueOf(x));
   169     }
   169     }
   170 
   170 
   171     /**
   171     /**
   172      * Writes an <code>int</code> in the Java programming language
   172      * Writes an <code>int</code> in the Java programming language
   173      * to this <code>SQLOutputImpl</code> object. The driver converts
   173      * to this <code>SQLOutputImpl</code> object. The driver converts
   177      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   177      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   178      *        use by a <code>SQLData</code> object attempting to write the attribute
   178      *        use by a <code>SQLData</code> object attempting to write the attribute
   179      *        values of a UDT to the database.
   179      *        values of a UDT to the database.
   180      */
   180      */
   181     public void writeInt(int x) throws SQLException {
   181     public void writeInt(int x) throws SQLException {
   182         attribs.add(new Integer(x));
   182         attribs.add(Integer.valueOf(x));
   183     }
   183     }
   184 
   184 
   185     /**
   185     /**
   186      * Writes a <code>long</code> in the Java programming language
   186      * Writes a <code>long</code> in the Java programming language
   187      * to this <code>SQLOutputImpl</code> object. The driver converts
   187      * to this <code>SQLOutputImpl</code> object. The driver converts
   191      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   191      * @throws SQLException if the <code>SQLOutputImpl</code> object is in
   192      *        use by a <code>SQLData</code> object attempting to write the attribute
   192      *        use by a <code>SQLData</code> object attempting to write the attribute
   193      *        values of a UDT to the database.
   193      *        values of a UDT to the database.
   194      */
   194      */
   195     public void writeLong(long x) throws SQLException {
   195     public void writeLong(long x) throws SQLException {
   196         attribs.add(new Long(x));
   196         attribs.add(Long.valueOf(x));
   197     }
   197     }
   198 
   198 
   199     /**
   199     /**
   200      * Writes a <code>float</code> in the Java programming language
   200      * Writes a <code>float</code> in the Java programming language
   201      * to this <code>SQLOutputImpl</code> object. The driver converts
   201      * to this <code>SQLOutputImpl</code> object. The driver converts