From dee79d605334804118839e9f71151a7e8d1ad27b Mon Sep 17 00:00:00 2001 From: Vipin Sharma Date: Wed, 25 Nov 2020 16:01:40 +0000 Subject: 8253936: Replace ... with {@code ...} for java.sql Reviewed-by: lancea --- src/java.sql/share/classes/java/sql/SQLInput.java | 184 +++++++++++----------- 1 file changed, 92 insertions(+), 92 deletions(-) (limited to 'src/java.sql/share/classes/java/sql/SQLInput.java') diff --git a/src/java.sql/share/classes/java/sql/SQLInput.java b/src/java.sql/share/classes/java/sql/SQLInput.java index 15052bd3e5e..659936c0bcd 100644 --- a/src/java.sql/share/classes/java/sql/SQLInput.java +++ b/src/java.sql/share/classes/java/sql/SQLInput.java @@ -30,24 +30,24 @@ package java.sql; * instance of an SQL structured type or an SQL distinct type. * This interface, used only for custom mapping, is used by the driver * behind the scenes, and a programmer never directly invokes - * SQLInput methods. The reader methods - * (readLong, readBytes, and so on) - * provide a way for an implementation of the SQLData - * interface to read the values in an SQLInput object. - * And as described in SQLData, calls to reader methods must + * {@code SQLInput} methods. The reader methods + * ({@code readLong}, {@code readBytes}, and so on) + * provide a way for an implementation of the {@code SQLData} + * interface to read the values in an {@code SQLInput} object. + * And as described in {@code SQLData}, calls to reader methods must * be made in the order that their corresponding attributes appear in the * SQL definition of the type. - * The method wasNull is used to determine whether - * the last value read was SQL NULL. - *

When the method getObject is called with an - * object of a class implementing the interface SQLData, - * the JDBC driver calls the method SQLData.getSQLType + * The method {@code wasNull} is used to determine whether + * the last value read was SQL {@code NULL}. + *

When the method {@code getObject} is called with an + * object of a class implementing the interface {@code SQLData}, + * the JDBC driver calls the method {@code SQLData.getSQLType} * to determine the SQL type of the user-defined type (UDT) * being custom mapped. The driver - * creates an instance of SQLInput, populating it with the + * creates an instance of {@code SQLInput}, populating it with the * attributes of the UDT. The driver then passes the input - * stream to the method SQLData.readSQL, which in turn - * calls the SQLInput reader methods + * stream to the method {@code SQLData.readSQL}, which in turn + * calls the {@code SQLInput} reader methods * in its implementation for reading the * attributes from the input stream. * @since 1.2 @@ -63,10 +63,10 @@ public interface SQLInput { //================================================================ /** - * Reads the next attribute in the stream and returns it as a String + * Reads the next attribute in the stream and returns it as a {@code String} * in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -75,10 +75,10 @@ public interface SQLInput { String readString() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a boolean + * Reads the next attribute in the stream and returns it as a {@code boolean} * in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns false + * @return the attribute; if the value is SQL {@code NULL}, returns {@code false} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -87,10 +87,10 @@ public interface SQLInput { boolean readBoolean() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a byte + * Reads the next attribute in the stream and returns it as a {@code byte} * in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns 0 + * @return the attribute; if the value is SQL {@code NULL}, returns {@code 0} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -99,10 +99,10 @@ public interface SQLInput { byte readByte() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a short + * Reads the next attribute in the stream and returns it as a {@code short} * in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns 0 + * @return the attribute; if the value is SQL {@code NULL}, returns {@code 0} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -111,10 +111,10 @@ public interface SQLInput { short readShort() throws SQLException; /** - * Reads the next attribute in the stream and returns it as an int + * Reads the next attribute in the stream and returns it as an {@code int} * in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns 0 + * @return the attribute; if the value is SQL {@code NULL}, returns {@code 0} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -123,10 +123,10 @@ public interface SQLInput { int readInt() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a long + * Reads the next attribute in the stream and returns it as a {@code long} * in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns 0 + * @return the attribute; if the value is SQL {@code NULL}, returns {@code 0} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -135,10 +135,10 @@ public interface SQLInput { long readLong() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a float + * Reads the next attribute in the stream and returns it as a {@code float} * in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns 0 + * @return the attribute; if the value is SQL {@code NULL}, returns {@code 0} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -147,10 +147,10 @@ public interface SQLInput { float readFloat() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a double + * Reads the next attribute in the stream and returns it as a {@code double} * in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns 0 + * @return the attribute; if the value is SQL {@code NULL}, returns {@code 0} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -159,10 +159,10 @@ public interface SQLInput { double readDouble() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a java.math.BigDecimal + * Reads the next attribute in the stream and returns it as a {@code java.math.BigDecimal} * object in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -174,7 +174,7 @@ public interface SQLInput { * Reads the next attribute in the stream and returns it as an array of bytes * in the Java programming language. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -183,9 +183,9 @@ public interface SQLInput { byte[] readBytes() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a java.sql.Date object. + * Reads the next attribute in the stream and returns it as a {@code java.sql.Date} object. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -194,9 +194,9 @@ public interface SQLInput { java.sql.Date readDate() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a java.sql.Time object. + * Reads the next attribute in the stream and returns it as a {@code java.sql.Time} object. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -205,9 +205,9 @@ public interface SQLInput { java.sql.Time readTime() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a java.sql.Timestamp object. + * Reads the next attribute in the stream and returns it as a {@code java.sql.Timestamp} object. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -218,7 +218,7 @@ public interface SQLInput { /** * Reads the next attribute in the stream and returns it as a stream of Unicode characters. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -229,7 +229,7 @@ public interface SQLInput { /** * Reads the next attribute in the stream and returns it as a stream of ASCII characters. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -241,7 +241,7 @@ public interface SQLInput { * Reads the next attribute in the stream and returns it as a stream of uninterpreted * bytes. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -255,23 +255,23 @@ public interface SQLInput { /** * Reads the datum at the head of the stream and returns it as an - * Object in the Java programming language. The + * {@code Object} in the Java programming language. The * actual type of the object returned is determined by the default type * mapping, and any customizations present in this stream's type map. * *

A type map is registered with the stream by the JDBC driver before the * stream is passed to the application. * - *

When the datum at the head of the stream is an SQL NULL, - * the method returns null. If the datum is an SQL structured or distinct + *

When the datum at the head of the stream is an SQL {@code NULL}, + * the method returns {@code null}. If the datum is an SQL structured or distinct * type, it determines the SQL type of the datum at the head of the stream. * If the stream's type map has an entry for that SQL type, the driver * constructs an object of the appropriate class and calls the method - * SQLData.readSQL on that object, which reads additional data from the + * {@code SQLData.readSQL} on that object, which reads additional data from the * stream, using the protocol described for that method. * - * @return the datum at the head of the stream as an Object in the - * Java programming language;null if the datum is SQL NULL + * @return the datum at the head of the stream as an {@code Object} in the + * Java programming language;{@code null} if the datum is SQL {@code NULL} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -280,12 +280,12 @@ public interface SQLInput { Object readObject() throws SQLException; /** - * Reads an SQL REF value from the stream and returns it as a - * Ref object in the Java programming language. + * Reads an SQL {@code REF} value from the stream and returns it as a + * {@code Ref} object in the Java programming language. * - * @return a Ref object representing the SQL REF value - * at the head of the stream; null if the value read is - * SQL NULL + * @return a {@code Ref} object representing the SQL {@code REF} value + * at the head of the stream; {@code null} if the value read is + * SQL {@code NULL} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -294,12 +294,12 @@ public interface SQLInput { Ref readRef() throws SQLException; /** - * Reads an SQL BLOB value from the stream and returns it as a - * Blob object in the Java programming language. + * Reads an SQL {@code BLOB} value from the stream and returns it as a + * {@code Blob} object in the Java programming language. * - * @return a Blob object representing data of the SQL BLOB value - * at the head of the stream; null if the value read is - * SQL NULL + * @return a {@code Blob} object representing data of the SQL {@code BLOB} value + * at the head of the stream; {@code null} if the value read is + * SQL {@code NULL} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -308,12 +308,12 @@ public interface SQLInput { Blob readBlob() throws SQLException; /** - * Reads an SQL CLOB value from the stream and returns it as a - * Clob object in the Java programming language. + * Reads an SQL {@code CLOB} value from the stream and returns it as a + * {@code Clob} object in the Java programming language. * - * @return a Clob object representing data of the SQL CLOB value - * at the head of the stream; null if the value read is - * SQL NULL + * @return a {@code Clob} object representing data of the SQL {@code CLOB} value + * at the head of the stream; {@code null} if the value read is + * SQL {@code NULL} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -322,12 +322,12 @@ public interface SQLInput { Clob readClob() throws SQLException; /** - * Reads an SQL ARRAY value from the stream and returns it as an - * Array object in the Java programming language. + * Reads an SQL {@code ARRAY} value from the stream and returns it as an + * {@code Array} object in the Java programming language. * - * @return an Array object representing data of the SQL - * ARRAY value at the head of the stream; null - * if the value read is SQL NULL + * @return an {@code Array} object representing data of the SQL + * {@code ARRAY} value at the head of the stream; {@code null} + * if the value read is SQL {@code NULL} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -336,10 +336,10 @@ public interface SQLInput { Array readArray() throws SQLException; /** - * Retrieves whether the last value read was SQL NULL. + * Retrieves whether the last value read was SQL {@code NULL}. * - * @return true if the most recently read SQL value was SQL - * NULL; false otherwise + * @return {@code true} if the most recently read SQL value was SQL + * {@code NULL}; {@code false} otherwise * @throws SQLException if a database access error occurs * * @throws SQLFeatureNotSupportedException if the JDBC driver does not support @@ -351,10 +351,10 @@ public interface SQLInput { //---------------------------- JDBC 3.0 ------------------------- /** - * Reads an SQL DATALINK value from the stream and returns it as a - * java.net.URL object in the Java programming language. + * Reads an SQL {@code DATALINK} value from the stream and returns it as a + * {@code java.net.URL} object in the Java programming language. * - * @return a java.net.URL object. + * @return a {@code java.net.URL} object. * @throws SQLException if a database access error occurs, * or if a URL is malformed * @throws SQLFeatureNotSupportedException if the JDBC driver does not support @@ -366,12 +366,12 @@ public interface SQLInput { //---------------------------- JDBC 4.0 ------------------------- /** - * Reads an SQL NCLOB value from the stream and returns it as a - * NClob object in the Java programming language. + * Reads an SQL {@code NCLOB} value from the stream and returns it as a + * {@code NClob} object in the Java programming language. * - * @return a NClob object representing data of the SQL NCLOB value - * at the head of the stream; null if the value read is - * SQL NULL + * @return a {@code NClob} object representing data of the SQL {@code NCLOB} value + * at the head of the stream; {@code null} if the value read is + * SQL {@code NULL} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -380,12 +380,12 @@ public interface SQLInput { NClob readNClob() throws SQLException; /** - * Reads the next attribute in the stream and returns it as a String + * Reads the next attribute in the stream and returns it as a {@code String} * in the Java programming language. It is intended for use when - * accessing NCHAR,NVARCHAR - * and LONGNVARCHAR columns. + * accessing {@code NCHAR},{@code NVARCHAR} + * and {@code LONGNVARCHAR} columns. * - * @return the attribute; if the value is SQL NULL, returns null + * @return the attribute; if the value is SQL {@code NULL}, returns {@code null} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -394,12 +394,12 @@ public interface SQLInput { String readNString() throws SQLException; /** - * Reads an SQL XML value from the stream and returns it as a - * SQLXML object in the Java programming language. + * Reads an SQL {@code XML} value from the stream and returns it as a + * {@code SQLXML} object in the Java programming language. * - * @return a SQLXML object representing data of the SQL XML value - * at the head of the stream; null if the value read is - * SQL NULL + * @return a {@code SQLXML} object representing data of the SQL {@code XML} value + * at the head of the stream; {@code null} if the value read is + * SQL {@code NULL} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method @@ -408,12 +408,12 @@ public interface SQLInput { SQLXML readSQLXML() throws SQLException; /** - * Reads an SQL ROWID value from the stream and returns it as a - * RowId object in the Java programming language. + * Reads an SQL {@code ROWID} value from the stream and returns it as a + * {@code RowId} object in the Java programming language. * - * @return a RowId object representing data of the SQL ROWID value - * at the head of the stream; null if the value read is - * SQL NULL + * @return a {@code RowId} object representing data of the SQL {@code ROWID} value + * at the head of the stream; {@code null} if the value read is + * SQL {@code NULL} * @throws SQLException if a database access error occurs * @throws SQLFeatureNotSupportedException if the JDBC driver does not support * this method -- cgit v1.3.1