src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2012, 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) 2003, 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
*** 22,31 ****
--- 22,32 ----
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.sql.rowset.serial;
+ import java.net.URL;
import java.sql.*;
import java.util.Arrays;
import java.util.Map;
/**
*** 764,774 ****
* <code>null</code>
* @throws SQLException if the read position is located at an invalid
* position; or if there are no further values in the stream.
*/
public java.net.URL readURL() throws SQLException {
! throw new SQLException("Operation not supported");
}
//---------------------------- JDBC 4.0 -------------------------
/**
--- 765,783 ----
* <code>null</code>
* @throws SQLException if the read position is located at an invalid
* position; or if there are no further values in the stream.
*/
public java.net.URL readURL() throws SQLException {
! URL attrib = (URL)getNextAttribute();
!
! if (attrib == null) {
! lastValueWasNull = true;
! return null;
! } else {
! lastValueWasNull = false;
! return attrib;
! }
}
//---------------------------- JDBC 4.0 -------------------------
/**
*** 779,790 ****
* at the head of the stream; <code>null</code> if the value read is
* SQL <code>NULL</code>
* @exception SQLException if a database access error occurs
*/
public NClob readNClob() throws SQLException {
! throw new UnsupportedOperationException("Operation not supported");
! }
/**
* Reads the next attribute in the stream and returns it as a <code>String</code>
* in the Java programming language. It is intended for use when
* accessing <code>NCHAR</code>,<code>NVARCHAR</code>
--- 788,805 ----
* at the head of the stream; <code>null</code> if the value read is
* SQL <code>NULL</code>
* @exception SQLException if a database access error occurs
*/
public NClob readNClob() throws SQLException {
! NClob attrib = (NClob)getNextAttribute();
! if (attrib == null) {
! lastValueWasNull = true;
! return null;
! } else {
! lastValueWasNull = false;
! return attrib;
! } }
/**
* Reads the next attribute in the stream and returns it as a <code>String</code>
* in the Java programming language. It is intended for use when
* accessing <code>NCHAR</code>,<code>NVARCHAR</code>
*** 792,803 ****
*
* @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code>
* @exception SQLException if a database access error occurs
*/
public String readNString() throws SQLException {
! throw new UnsupportedOperationException("Operation not supported");
! }
/**
* Reads an SQL <code>XML</code> value from the stream and returns it as a
* <code>SQLXML</code> object in the Java programming language.
*
--- 807,825 ----
*
* @return the attribute; if the value is SQL <code>NULL</code>, returns <code>null</code>
* @exception SQLException if a database access error occurs
*/
public String readNString() throws SQLException {
! String attrib = (String)getNextAttribute();
!
! if (attrib == null) {
! lastValueWasNull = true;
! return null;
! } else {
! lastValueWasNull = false;
! return attrib;
! } }
/**
* Reads an SQL <code>XML</code> value from the stream and returns it as a
* <code>SQLXML</code> object in the Java programming language.
*
*** 805,816 ****
* at the head of the stream; <code>null</code> if the value read is
* SQL <code>NULL</code>
* @exception SQLException if a database access error occurs
*/
public SQLXML readSQLXML() throws SQLException {
! throw new UnsupportedOperationException("Operation not supported");
! }
/**
* Reads an SQL <code>ROWID</code> value from the stream and returns it as a
* <code>RowId</code> object in the Java programming language.
*
--- 827,844 ----
* at the head of the stream; <code>null</code> if the value read is
* SQL <code>NULL</code>
* @exception SQLException if a database access error occurs
*/
public SQLXML readSQLXML() throws SQLException {
! SQLXML attrib = (SQLXML)getNextAttribute();
! if (attrib == null) {
! lastValueWasNull = true;
! return null;
! } else {
! lastValueWasNull = false;
! return attrib;
! } }
/**
* Reads an SQL <code>ROWID</code> value from the stream and returns it as a
* <code>RowId</code> object in the Java programming language.
*
*** 818,827 ****
* at the head of the stream; <code>null</code> if the value read is
* SQL <code>NULL</code>
* @exception SQLException if a database access error occurs
*/
public RowId readRowId() throws SQLException {
! throw new UnsupportedOperationException("Operation not supported");
}
}
--- 846,862 ----
* at the head of the stream; <code>null</code> if the value read is
* SQL <code>NULL</code>
* @exception SQLException if a database access error occurs
*/
public RowId readRowId() throws SQLException {
! RowId attrib = (RowId)getNextAttribute();
! if (attrib == null) {
! lastValueWasNull = true;
! return null;
! } else {
! lastValueWasNull = false;
! return attrib;
! }
}
}