--- old/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java 2013-01-12 14:47:15.000000000 -0500
+++ new/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java 2013-01-12 14:47:14.000000000 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -24,6 +24,7 @@
*/
package javax.sql.rowset.serial;
+import java.net.URL;
import java.sql.*;
import java.util.Arrays;
import java.util.Map;
@@ -766,11 +767,19 @@
* position; or if there are no further values in the stream.
*/
public java.net.URL readURL() throws SQLException {
- throw new SQLException("Operation not supported");
+ URL attrib = (URL)getNextAttribute();
+
+ if (attrib == null) {
+ lastValueWasNull = true;
+ return null;
+ } else {
+ lastValueWasNull = false;
+ return attrib;
+ }
}
//---------------------------- JDBC 4.0 -------------------------
-
+
/**
* Reads an SQL NCLOB
value from the stream and returns it as a
* Clob
object in the Java programming language.
@@ -781,8 +790,14 @@
* @exception SQLException if a database access error occurs
*/
public NClob readNClob() throws SQLException {
- throw new UnsupportedOperationException("Operation not supported");
- }
+ 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 String
@@ -794,8 +809,15 @@
* @exception SQLException if a database access error occurs
*/
public String readNString() throws SQLException {
- throw new UnsupportedOperationException("Operation not supported");
- }
+ String attrib = (String)getNextAttribute();
+
+ if (attrib == null) {
+ lastValueWasNull = true;
+ return null;
+ } else {
+ lastValueWasNull = false;
+ return attrib;
+ } }
/**
* Reads an SQL XML
value from the stream and returns it as a
@@ -807,10 +829,16 @@
* @exception SQLException if a database access error occurs
*/
public SQLXML readSQLXML() throws SQLException {
- throw new UnsupportedOperationException("Operation not supported");
- }
+ SQLXML attrib = (SQLXML)getNextAttribute();
+ if (attrib == null) {
+ lastValueWasNull = true;
+ return null;
+ } else {
+ lastValueWasNull = false;
+ return attrib;
+ } }
- /**
+ /**
* Reads an SQL ROWID
value from the stream and returns it as a
* RowId
object in the Java programming language.
*
@@ -820,7 +848,14 @@
* @exception SQLException if a database access error occurs
*/
public RowId readRowId() throws SQLException {
- throw new UnsupportedOperationException("Operation not supported");
+ RowId attrib = (RowId)getNextAttribute();
+ if (attrib == null) {
+ lastValueWasNull = true;
+ return null;
+ } else {
+ lastValueWasNull = false;
+ return attrib;
+ }
}