According to documentation JDBCResultSet getBytes() method should return value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.
It doesn't work for columns defined as VARCHAR. It would be really helpful if it could be fix. It works fine with SQLServer driver.
java.sql.SQLSyntaxErrorException: incompatible data type in conversion: from SQL type VARCHAR to [B, value: testValue
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.throwError(Unknown Source)
at org.hsqldb.jdbc.JDBCResultSet.getColumnInType(Unknown Source)
at org.hsqldb.jdbc.JDBCResultSet.getBytes(Unknown Source)
at org.hsqldb.jdbc.JDBCResultSet.getBytes(Unknown Source)