@Override public byte[] getBytes() { if (type == CLOB) { // convert hex to string return super.getBytes(); } byte[] data = getBytesNoCopy(); return Utils.cloneByteArray(data); }
/** * Returns the value of the specified column as a byte array. * * @param columnLabel the column label * @return the value * @throws SQLException if the column is not found or if the result set is * closed */ @Override public byte[] getBytes(String columnLabel) throws SQLException { try { debugCodeCall("getBytes", columnLabel); return get(columnLabel).getBytes(); } catch (Exception e) { throw logAndConvert(e); } }
/** * Returns the value of the specified column as a byte array. * * @param columnIndex (1,2,...) * @return the value * @throws SQLException if the column is not found or if the result set is * closed */ @Override public byte[] getBytes(int columnIndex) throws SQLException { try { debugCodeCall("getBytes", columnIndex); return get(columnIndex).getBytes(); } catch (Exception e) { throw logAndConvert(e); } }