equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2014, 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 |
413 * <p>The JDBC specification specifies a standard mapping from |
413 * <p>The JDBC specification specifies a standard mapping from |
414 * Java <code>Object</code> types to SQL types. The given argument |
414 * Java <code>Object</code> types to SQL types. The given argument |
415 * will be converted to the corresponding SQL type before being |
415 * will be converted to the corresponding SQL type before being |
416 * sent to the database. |
416 * sent to the database. |
417 * |
417 * |
418 * <p>Note that this method may be used to pass datatabase- |
418 * <p>Note that this method may be used to pass database- |
419 * specific abstract data types, by using a driver-specific Java |
419 * specific abstract data types, by using a driver-specific Java |
420 * type. |
420 * type. |
421 * |
421 * |
422 * If the object is of a class implementing the interface <code>SQLData</code>, |
422 * If the object is of a class implementing the interface <code>SQLData</code>, |
423 * the JDBC driver should call the method <code>SQLData.writeSQL</code> |
423 * the JDBC driver should call the method <code>SQLData.writeSQL</code> |
836 */ |
836 */ |
837 void setClob(int parameterIndex, Reader reader, long length) |
837 void setClob(int parameterIndex, Reader reader, long length) |
838 throws SQLException; |
838 throws SQLException; |
839 |
839 |
840 /** |
840 /** |
841 * Sets the designated parameter to a <code>InputStream</code> object. The inputstream must contain the number |
841 * Sets the designated parameter to a <code>InputStream</code> object. |
|
842 * The {@code Inputstream} must contain the number |
842 * of characters specified by length otherwise a <code>SQLException</code> will be |
843 * of characters specified by length otherwise a <code>SQLException</code> will be |
843 * generated when the <code>PreparedStatement</code> is executed. |
844 * generated when the <code>PreparedStatement</code> is executed. |
844 * This method differs from the <code>setBinaryStream (int, InputStream, int)</code> |
845 * This method differs from the <code>setBinaryStream (int, InputStream, int)</code> |
845 * method because it informs the driver that the parameter value should be |
846 * method because it informs the driver that the parameter value should be |
846 * sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used, |
847 * sent to the server as a <code>BLOB</code>. When the <code>setBinaryStream</code> method is used, |
852 * value to. |
853 * value to. |
853 * @param length the number of bytes in the parameter data. |
854 * @param length the number of bytes in the parameter data. |
854 * @throws SQLException if parameterIndex does not correspond to a parameter |
855 * @throws SQLException if parameterIndex does not correspond to a parameter |
855 * marker in the SQL statement; if a database access error occurs; |
856 * marker in the SQL statement; if a database access error occurs; |
856 * this method is called on a closed <code>PreparedStatement</code>; |
857 * this method is called on a closed <code>PreparedStatement</code>; |
857 * if the length specified |
858 * if the length specified |
858 * is less than zero or if the number of bytes in the inputstream does not match |
859 * is less than zero or if the number of bytes in the {@code InputStream} does not match |
859 * the specified length. |
860 * the specified length. |
860 * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
861 * @throws SQLFeatureNotSupportedException if the JDBC driver does not support this method |
861 * |
862 * |
862 * @since 1.6 |
863 * @since 1.6 |
863 */ |
864 */ |