You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by sm...@apache.org on 2006/08/25 06:27:46 UTC
svn commit: r436642 [1/10] -
/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/
Author: smishura
Date: Thu Aug 24 21:27:45 2006
New Revision: 436642
URL: http://svn.apache.org/viewvc?rev=436642&view=rev
Log:
Setting eol-style=native
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Array.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/BatchUpdateException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Blob.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/CallableStatement.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Clob.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Connection.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/DataTruncation.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/DatabaseMetaData.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Date.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Driver.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/DriverManager.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/DriverPropertyInfo.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/ParameterMetaData.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/PreparedStatement.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Ref.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/ResultSet.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/ResultSetMetaData.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLData.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLException.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLInput.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLOutput.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLPermission.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/SQLWarning.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Savepoint.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Statement.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Struct.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Time.java (contents, props changed)
incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Types.java (contents, props changed)
Modified: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Array.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Array.java?rev=436642&r1=436641&r2=436642&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Array.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Array.java Thu Aug 24 21:27:45 2006
@@ -1,131 +1,131 @@
-/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.sql;
-
-import java.util.Map;
-
-/**
- * A Java representation of the SQL ARRAY type.
- */
-public interface Array {
-
- /**
- * Retrieves the contents of the SQL ARRAY value as a Java array object.
- *
- * @return A Java array containing the elements of this Array
- * @throws SQLException
- */
- public Object getArray() throws SQLException;
-
- /**
- * Returns part of the SQL ARRAY associated with this Array, starting at a
- * particular index and comprising up to count successive elements of the
- * SQL array.
- *
- * @param index
- * @param count
- * @return A Java array containing the subportion of elements of this Array
- * @throws SQLException
- */
- public Object getArray(long index, int count) throws SQLException;
-
- /**
- * Returns part of the SQL ARRAY associated with this Array, starting at a
- * particular index and comprising up to count successive elements of the
- * SQL array.
- *
- * @param index
- * @param count
- * @param map
- * @return A Java array containing the subportion of elements of this Array
- * @throws SQLException
- */
- public Object getArray(long index, int count, Map<String, Class<?>> map)
- throws SQLException;
-
- /**
- * Returns the SQL ARRAY associated with this Array.
- *
- * @param map
- * @return A Java array containing the elements of this Array
- * @throws SQLException
- */
- public Object getArray(Map<String, Class<?>> map) throws SQLException;
-
- /**
- * Returns the JDBC type of the entries in this Array's associated array.
- *
- * @return An integer constant from the java.sql.Types class
- * @throws SQLException
- */
- public int getBaseType() throws SQLException;
-
- /**
- * Returns the SQL type name of the entries in the array associated with
- * this Array.
- *
- * @return The database specific name or a fully-qualified SQL type name.
- * @throws SQLException
- */
- public String getBaseTypeName() throws SQLException;
-
- /**
- * Returns a ResultSet object which holds the entries of the SQL ARRAY
- * associated with this Array.
- *
- * @return the ResultSet
- * @throws SQLException
- */
- public ResultSet getResultSet() throws SQLException;
-
- /**
- * Returns a ResultSet object that holds the entries of a subarray,
- * beginning at a particular index and comprising up to count successive
- * entries.
- *
- * @param index
- * @param count
- * @return the ResultSet
- * @throws SQLException
- */
- public ResultSet getResultSet(long index, int count) throws SQLException;
-
- /**
- * Returns a ResultSet object that holds the entries of a subarray,
- * beginning at a particular index and comprising up to count successive
- * entries.
- *
- * @param index
- * @param count
- * @param map
- * @return the ResultSet
- * @throws SQLException
- */
- public ResultSet getResultSet(long index, int count,
- Map<String, Class<?>> map) throws SQLException;
-
- /**
- * Returns a ResultSet object which holds the entries of the SQL ARRAY
- * associated with this Array.
- *
- * @param map
- * @return the ResultSet
- * @throws SQLException
- */
- public ResultSet getResultSet(Map<String, Class<?>> map)
- throws SQLException;
-
-}
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.sql;
+
+import java.util.Map;
+
+/**
+ * A Java representation of the SQL ARRAY type.
+ */
+public interface Array {
+
+ /**
+ * Retrieves the contents of the SQL ARRAY value as a Java array object.
+ *
+ * @return A Java array containing the elements of this Array
+ * @throws SQLException
+ */
+ public Object getArray() throws SQLException;
+
+ /**
+ * Returns part of the SQL ARRAY associated with this Array, starting at a
+ * particular index and comprising up to count successive elements of the
+ * SQL array.
+ *
+ * @param index
+ * @param count
+ * @return A Java array containing the subportion of elements of this Array
+ * @throws SQLException
+ */
+ public Object getArray(long index, int count) throws SQLException;
+
+ /**
+ * Returns part of the SQL ARRAY associated with this Array, starting at a
+ * particular index and comprising up to count successive elements of the
+ * SQL array.
+ *
+ * @param index
+ * @param count
+ * @param map
+ * @return A Java array containing the subportion of elements of this Array
+ * @throws SQLException
+ */
+ public Object getArray(long index, int count, Map<String, Class<?>> map)
+ throws SQLException;
+
+ /**
+ * Returns the SQL ARRAY associated with this Array.
+ *
+ * @param map
+ * @return A Java array containing the elements of this Array
+ * @throws SQLException
+ */
+ public Object getArray(Map<String, Class<?>> map) throws SQLException;
+
+ /**
+ * Returns the JDBC type of the entries in this Array's associated array.
+ *
+ * @return An integer constant from the java.sql.Types class
+ * @throws SQLException
+ */
+ public int getBaseType() throws SQLException;
+
+ /**
+ * Returns the SQL type name of the entries in the array associated with
+ * this Array.
+ *
+ * @return The database specific name or a fully-qualified SQL type name.
+ * @throws SQLException
+ */
+ public String getBaseTypeName() throws SQLException;
+
+ /**
+ * Returns a ResultSet object which holds the entries of the SQL ARRAY
+ * associated with this Array.
+ *
+ * @return the ResultSet
+ * @throws SQLException
+ */
+ public ResultSet getResultSet() throws SQLException;
+
+ /**
+ * Returns a ResultSet object that holds the entries of a subarray,
+ * beginning at a particular index and comprising up to count successive
+ * entries.
+ *
+ * @param index
+ * @param count
+ * @return the ResultSet
+ * @throws SQLException
+ */
+ public ResultSet getResultSet(long index, int count) throws SQLException;
+
+ /**
+ * Returns a ResultSet object that holds the entries of a subarray,
+ * beginning at a particular index and comprising up to count successive
+ * entries.
+ *
+ * @param index
+ * @param count
+ * @param map
+ * @return the ResultSet
+ * @throws SQLException
+ */
+ public ResultSet getResultSet(long index, int count,
+ Map<String, Class<?>> map) throws SQLException;
+
+ /**
+ * Returns a ResultSet object which holds the entries of the SQL ARRAY
+ * associated with this Array.
+ *
+ * @param map
+ * @return the ResultSet
+ * @throws SQLException
+ */
+ public ResultSet getResultSet(Map<String, Class<?>> map)
+ throws SQLException;
+
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Array.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/BatchUpdateException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/BatchUpdateException.java?rev=436642&r1=436641&r2=436642&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/BatchUpdateException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/BatchUpdateException.java Thu Aug 24 21:27:45 2006
@@ -1,145 +1,145 @@
-/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.sql;
-
-import java.io.Serializable;
-
-/**
- * An exception thrown if a problem occurs during a batch update operation.
- * <p>
- * A BatchUpdateException provides additional information about the problem that
- * occurred, compared with a standard SQLException. It supplies update counts
- * for successful commands that executed within the batch update, but before the
- * exception was encountered.
- * <p>
- * The element order in the array of update counts matches the order that the
- * commands were added to the batch operation.
- * <p>
- * Once a batch update command fails and a BatchUpdateException is thrown, the
- * JDBC driver may continue processing the remaining commands in the batch. If
- * the driver does process more commands after the problem occurs, the array
- * returned by BatchUpdateException.getUpdateCounts has an element for every
- * command in the batch, not only those that executed successfully. In this
- * case, the array element for any command which encountered a problem is set to
- * Statement.EXECUTE_FAILED.
- */
-public class BatchUpdateException extends SQLException implements Serializable {
-
- private static final long serialVersionUID = 5977529877145521757L;
-
- private int[] theUpdateCounts = null;
-
- /**
- * Creates a BatchUpdateException with the Reason, SQLState, and Update
- * Counts set to null and a Vendor Code of 0.
- */
- public BatchUpdateException() {
- super();
- }
-
- /**
- * Creates a BatchUpdateException with the Update Counts set to the supplied
- * value and the Reason, SQLState set to null and a Vendor Code of 0.
- *
- * @param updateCounts
- * the array of Update Counts to use in initialization
- */
- public BatchUpdateException(int[] updateCounts) {
- super();
- this.theUpdateCounts = updateCounts;
- }
-
- /**
- * Creates a BatchUpdateException with the Update Counts set to the supplied
- * value, the Reason set to the supplied value and SQLState set to null and
- * a Vendor Code of 0.
- *
- * @param reason
- * the initialization value for Reason
- * @param updateCounts
- * the array of Update Counts to set
- */
- public BatchUpdateException(String reason, int[] updateCounts) {
- super(reason);
- this.theUpdateCounts = updateCounts;
- }
-
- /**
- * Creates a BatchUpdateException with the Update Counts set to the supplied
- * value, the Reason set to the supplied value, the SQLState initialized to
- * the supplied value and the Vendor Code initialized to 0.
- *
- * @param reason
- * the value to use for the Reason
- * @param SQLState
- * the X/OPEN value to use for the SQLState
- * @param updateCounts
- * the array of Update Counts to set
- */
- public BatchUpdateException(String reason, String SQLState,
- int[] updateCounts) {
- super(reason, SQLState);
- this.theUpdateCounts = updateCounts;
- }
-
- /**
- * Creates a BatchUpdateException with the Update Counts set to the supplied
- * value, the Reason set to the supplied value, the SQLState initialized to
- * the supplied value and the Vendor Code set to the supplied value.
- *
- * @param reason
- * the value to use for the Reason
- * @param SQLState
- * the X/OPEN value to use for the SQLState
- * @param vendorCode
- * the value to use for the vendor error code
- * @param updateCounts
- * the array of Update Counts to set
- */
- public BatchUpdateException(String reason, String SQLState, int vendorCode,
- int[] updateCounts) {
- super(reason, SQLState, vendorCode);
- this.theUpdateCounts = updateCounts;
- }
-
- /**
- * Gets the Update Counts array.
- * <p>
- * If a batch update command fails and a BatchUpdateException is thrown, the
- * JDBC driver may continue processing the remaining commands in the batch.
- * If the driver does process more commands after the problem occurs, the
- * array returned by <code>BatchUpdateException.getUpdateCounts</code> has
- * an element for every command in the batch, not only those that executed
- * successfully. In this case, the array element for any command which
- * encountered a problem is set to Statement.EXECUTE_FAILED.
- *
- * @return an array that contains the successful update counts, before this
- * exception. Alternatively, if the driver continues to process
- * commands following an error, one of these listed items for every
- * command the batch contains:
- * <ol>
- * <li>an count of the updates</li>
- * <li><code>Statement.SUCCESS_NO_INFO</code> indicating that the
- * command completed successfully, but the amount of altered rows is
- * not known.</li>
- * <li><code>Statement.EXECUTE_FAILED</code> indicating that the
- * command was unsuccessful.
- * </ol>
- */
- public int[] getUpdateCounts() {
- return theUpdateCounts;
- }
-}
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.sql;
+
+import java.io.Serializable;
+
+/**
+ * An exception thrown if a problem occurs during a batch update operation.
+ * <p>
+ * A BatchUpdateException provides additional information about the problem that
+ * occurred, compared with a standard SQLException. It supplies update counts
+ * for successful commands that executed within the batch update, but before the
+ * exception was encountered.
+ * <p>
+ * The element order in the array of update counts matches the order that the
+ * commands were added to the batch operation.
+ * <p>
+ * Once a batch update command fails and a BatchUpdateException is thrown, the
+ * JDBC driver may continue processing the remaining commands in the batch. If
+ * the driver does process more commands after the problem occurs, the array
+ * returned by BatchUpdateException.getUpdateCounts has an element for every
+ * command in the batch, not only those that executed successfully. In this
+ * case, the array element for any command which encountered a problem is set to
+ * Statement.EXECUTE_FAILED.
+ */
+public class BatchUpdateException extends SQLException implements Serializable {
+
+ private static final long serialVersionUID = 5977529877145521757L;
+
+ private int[] theUpdateCounts = null;
+
+ /**
+ * Creates a BatchUpdateException with the Reason, SQLState, and Update
+ * Counts set to null and a Vendor Code of 0.
+ */
+ public BatchUpdateException() {
+ super();
+ }
+
+ /**
+ * Creates a BatchUpdateException with the Update Counts set to the supplied
+ * value and the Reason, SQLState set to null and a Vendor Code of 0.
+ *
+ * @param updateCounts
+ * the array of Update Counts to use in initialization
+ */
+ public BatchUpdateException(int[] updateCounts) {
+ super();
+ this.theUpdateCounts = updateCounts;
+ }
+
+ /**
+ * Creates a BatchUpdateException with the Update Counts set to the supplied
+ * value, the Reason set to the supplied value and SQLState set to null and
+ * a Vendor Code of 0.
+ *
+ * @param reason
+ * the initialization value for Reason
+ * @param updateCounts
+ * the array of Update Counts to set
+ */
+ public BatchUpdateException(String reason, int[] updateCounts) {
+ super(reason);
+ this.theUpdateCounts = updateCounts;
+ }
+
+ /**
+ * Creates a BatchUpdateException with the Update Counts set to the supplied
+ * value, the Reason set to the supplied value, the SQLState initialized to
+ * the supplied value and the Vendor Code initialized to 0.
+ *
+ * @param reason
+ * the value to use for the Reason
+ * @param SQLState
+ * the X/OPEN value to use for the SQLState
+ * @param updateCounts
+ * the array of Update Counts to set
+ */
+ public BatchUpdateException(String reason, String SQLState,
+ int[] updateCounts) {
+ super(reason, SQLState);
+ this.theUpdateCounts = updateCounts;
+ }
+
+ /**
+ * Creates a BatchUpdateException with the Update Counts set to the supplied
+ * value, the Reason set to the supplied value, the SQLState initialized to
+ * the supplied value and the Vendor Code set to the supplied value.
+ *
+ * @param reason
+ * the value to use for the Reason
+ * @param SQLState
+ * the X/OPEN value to use for the SQLState
+ * @param vendorCode
+ * the value to use for the vendor error code
+ * @param updateCounts
+ * the array of Update Counts to set
+ */
+ public BatchUpdateException(String reason, String SQLState, int vendorCode,
+ int[] updateCounts) {
+ super(reason, SQLState, vendorCode);
+ this.theUpdateCounts = updateCounts;
+ }
+
+ /**
+ * Gets the Update Counts array.
+ * <p>
+ * If a batch update command fails and a BatchUpdateException is thrown, the
+ * JDBC driver may continue processing the remaining commands in the batch.
+ * If the driver does process more commands after the problem occurs, the
+ * array returned by <code>BatchUpdateException.getUpdateCounts</code> has
+ * an element for every command in the batch, not only those that executed
+ * successfully. In this case, the array element for any command which
+ * encountered a problem is set to Statement.EXECUTE_FAILED.
+ *
+ * @return an array that contains the successful update counts, before this
+ * exception. Alternatively, if the driver continues to process
+ * commands following an error, one of these listed items for every
+ * command the batch contains:
+ * <ol>
+ * <li>an count of the updates</li>
+ * <li><code>Statement.SUCCESS_NO_INFO</code> indicating that the
+ * command completed successfully, but the amount of altered rows is
+ * not known.</li>
+ * <li><code>Statement.EXECUTE_FAILED</code> indicating that the
+ * command was unsuccessful.
+ * </ol>
+ */
+ public int[] getUpdateCounts() {
+ return theUpdateCounts;
+ }
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/BatchUpdateException.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Blob.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Blob.java?rev=436642&r1=436641&r2=436642&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Blob.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Blob.java Thu Aug 24 21:27:45 2006
@@ -1,158 +1,158 @@
-/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package java.sql;
-
-import java.io.OutputStream;
-import java.io.InputStream;
-
-/**
- * A Java interface mapping for the SQL BLOB type.
- * <p>
- * An SQL CLOB type stores a large array of bytes (binary data) as the value in
- * a column of a database.
- * <p>
- * The java.sql.Blob interface provides methods for setting and retrieving data
- * in the Blob, for querying Clob data length, for searching for data within the
- * Blob.
- */
-public interface Blob {
-
- /**
- * Retrieves this Blob object as a binary stream.
- *
- * @return a binary InputStream giving access to the Blob data
- * @throws SQLException
- * if an error occurs accessing the Blob
- */
- public InputStream getBinaryStream() throws SQLException;
-
- /**
- * Gets a portion of the value of this Blob as an array of bytes.
- *
- * @param pos
- * the position of the first byte in the Blob to get, where the
- * first byte in the Blob hss position = 1
- * @param length
- * the number of bytes to get
- * @return a byte array containing the data from the Blob, starting at pos
- * and of length up to <code>length</code> bytes long
- * @throws SQLException
- * if an error occurs accessing the Blob
- */
- public byte[] getBytes(long pos, int length) throws SQLException;
-
- /**
- * Gets the number of bytes in this Blob object.
- *
- * @return an long value with the length of the Blob in bytes
- * @throws SQLException
- * if an error occurs accessing the Blob
- */
- public long length() throws SQLException;
-
- /**
- * Search for the position in this Blob at which a specified pattern begins,
- * starting at a specified position within the Blob.
- *
- * @param pattern
- * a Blob containing the pattern of data to search for in this
- * Blob
- * @param start
- * the position within this Blob to start the search, where the
- * first position in the Blob is 1
- * @return a long value with the position at which the pattern begins. -1 if
- * the pattern is not found in this Blob.
- * @throws SQLException
- * if an error occurs accessing the Blob
- */
- public long position(Blob pattern, long start) throws SQLException;
-
- /**
- * Search for the position in this Blob at which the specified pattern
- * begins, starting at a specified position within the Blob.
- *
- * @param pattern
- * a byte array containing the pattern of data to search for in
- * this Blob
- * @param start
- * the position within this Blob to start the search, where the
- * first position in the Blob is 1
- * @return a long value with the position at which the pattern begins. -1 if
- * the pattern is not found in this Blob.
- * @throws SQLException
- * if an error occurs accessing the Blob
- */
- public long position(byte[] pattern, long start) throws SQLException;
-
- /**
- * Gets a stream that can be used to write binary data to this Blob.
- *
- * @param pos
- * the position within this Blob at which to start writing, where
- * the first position in the Blob is 1
- * @return a binary InputStream which can be used to write data into the
- * Blob starting at the specified position.
- * @throws SQLException
- * if an error occurs accessing the Blob
- */
- public OutputStream setBinaryStream(long pos) throws SQLException;
-
- /**
- * Writes a specified array of bytes to this Blob. object, starting at a
- * specified position. Returns the number of bytes written.
- *
- * @param pos
- * the position within this Blob at which to start writing, where
- * the first position in the Blob is 1
- * @param theBytes
- * an array of bytes to write into the Blob
- * @return an integer containing the number of bytes written to the Blob
- * @throws SQLException
- * if an error occurs accessing the Blob
- */
- public int setBytes(long pos, byte[] theBytes) throws SQLException;
-
- /**
- * Writes a portion of a specified byte array to this Blob. Returns the
- * number of bytes written.
- *
- * @param pos
- * the position within this Blob at which to start writing, where
- * the first position in the Blob is 1
- * @param theBytes
- * an array of bytes to write into the Blob
- * @param offset
- * the offset into the byte array from which to start writing
- * data - the first byte in the array has offset 0.
- * @param len
- * the length of data to write, as the number of bytes
- * @return an integer containing the number of bytes written to the Blob
- * @throws SQLException
- * if an error occurs accessing the Blob
- */
- public int setBytes(long pos, byte[] theBytes, int offset, int len)
- throws SQLException;
-
- /**
- * Truncate the value of this Blob object to a specified length in bytes.
- *
- * @param len
- * the length of data in bytes to truncate the value of this Blob
- * @throws SQLException
- * if an error occurs accessing the Blob
- */
- public void truncate(long len) throws SQLException;
-}
+/* Copyright 2004 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.sql;
+
+import java.io.OutputStream;
+import java.io.InputStream;
+
+/**
+ * A Java interface mapping for the SQL BLOB type.
+ * <p>
+ * An SQL CLOB type stores a large array of bytes (binary data) as the value in
+ * a column of a database.
+ * <p>
+ * The java.sql.Blob interface provides methods for setting and retrieving data
+ * in the Blob, for querying Clob data length, for searching for data within the
+ * Blob.
+ */
+public interface Blob {
+
+ /**
+ * Retrieves this Blob object as a binary stream.
+ *
+ * @return a binary InputStream giving access to the Blob data
+ * @throws SQLException
+ * if an error occurs accessing the Blob
+ */
+ public InputStream getBinaryStream() throws SQLException;
+
+ /**
+ * Gets a portion of the value of this Blob as an array of bytes.
+ *
+ * @param pos
+ * the position of the first byte in the Blob to get, where the
+ * first byte in the Blob hss position = 1
+ * @param length
+ * the number of bytes to get
+ * @return a byte array containing the data from the Blob, starting at pos
+ * and of length up to <code>length</code> bytes long
+ * @throws SQLException
+ * if an error occurs accessing the Blob
+ */
+ public byte[] getBytes(long pos, int length) throws SQLException;
+
+ /**
+ * Gets the number of bytes in this Blob object.
+ *
+ * @return an long value with the length of the Blob in bytes
+ * @throws SQLException
+ * if an error occurs accessing the Blob
+ */
+ public long length() throws SQLException;
+
+ /**
+ * Search for the position in this Blob at which a specified pattern begins,
+ * starting at a specified position within the Blob.
+ *
+ * @param pattern
+ * a Blob containing the pattern of data to search for in this
+ * Blob
+ * @param start
+ * the position within this Blob to start the search, where the
+ * first position in the Blob is 1
+ * @return a long value with the position at which the pattern begins. -1 if
+ * the pattern is not found in this Blob.
+ * @throws SQLException
+ * if an error occurs accessing the Blob
+ */
+ public long position(Blob pattern, long start) throws SQLException;
+
+ /**
+ * Search for the position in this Blob at which the specified pattern
+ * begins, starting at a specified position within the Blob.
+ *
+ * @param pattern
+ * a byte array containing the pattern of data to search for in
+ * this Blob
+ * @param start
+ * the position within this Blob to start the search, where the
+ * first position in the Blob is 1
+ * @return a long value with the position at which the pattern begins. -1 if
+ * the pattern is not found in this Blob.
+ * @throws SQLException
+ * if an error occurs accessing the Blob
+ */
+ public long position(byte[] pattern, long start) throws SQLException;
+
+ /**
+ * Gets a stream that can be used to write binary data to this Blob.
+ *
+ * @param pos
+ * the position within this Blob at which to start writing, where
+ * the first position in the Blob is 1
+ * @return a binary InputStream which can be used to write data into the
+ * Blob starting at the specified position.
+ * @throws SQLException
+ * if an error occurs accessing the Blob
+ */
+ public OutputStream setBinaryStream(long pos) throws SQLException;
+
+ /**
+ * Writes a specified array of bytes to this Blob. object, starting at a
+ * specified position. Returns the number of bytes written.
+ *
+ * @param pos
+ * the position within this Blob at which to start writing, where
+ * the first position in the Blob is 1
+ * @param theBytes
+ * an array of bytes to write into the Blob
+ * @return an integer containing the number of bytes written to the Blob
+ * @throws SQLException
+ * if an error occurs accessing the Blob
+ */
+ public int setBytes(long pos, byte[] theBytes) throws SQLException;
+
+ /**
+ * Writes a portion of a specified byte array to this Blob. Returns the
+ * number of bytes written.
+ *
+ * @param pos
+ * the position within this Blob at which to start writing, where
+ * the first position in the Blob is 1
+ * @param theBytes
+ * an array of bytes to write into the Blob
+ * @param offset
+ * the offset into the byte array from which to start writing
+ * data - the first byte in the array has offset 0.
+ * @param len
+ * the length of data to write, as the number of bytes
+ * @return an integer containing the number of bytes written to the Blob
+ * @throws SQLException
+ * if an error occurs accessing the Blob
+ */
+ public int setBytes(long pos, byte[] theBytes, int offset, int len)
+ throws SQLException;
+
+ /**
+ * Truncate the value of this Blob object to a specified length in bytes.
+ *
+ * @param len
+ * the length of data in bytes to truncate the value of this Blob
+ * @throws SQLException
+ * if an error occurs accessing the Blob
+ */
+ public void truncate(long len) throws SQLException;
+}
Propchange: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/java/sql/Blob.java
------------------------------------------------------------------------------
svn:eol-style = native