Hitachi

Hitachi Advanced Database Application Development Guide


8.5.19 getBytes(int columnIndex)

Organization of this subsection

(1) Function

This method acquires as a byte array in the Java programming language the value in a specified column in the current row of the ResultSet object. The column whose value is to be acquired is specified in the argument.

(2) Format

public synchronized byte[] getBytes(int columnIndex) throws SQLException

(3) Arguments

int columnIndex

Specifies a column number.

(4) Return value

This method returns the column value. The following table shows the relationship between the retrieval result and the return value.

Table 8‒23: Relationship between the retrieval result and the return value (getBytes method)

HADB data type

Retrieval result

Return value

BINARY

VARBINARY

Null value

null

Other than the above

Retrieval result converted to a byte value

ROW

The retrieval result will never be the null value.

Retrieval result converted to a byte value

Other

Not applicable

SQLException is thrown.

(5) Exceptions

The JDBC driver throws an SQLException in the following cases: