@ Override public byte [ ] getBytes ( int columnIndex ) throws SQLException { checkColumnBounds ( columnIndex ) ; try { if ( table . getColumnType ( columnIndex - 1 ) == VoltType . STRING ) return table . getStringAsBytes ( columnIndex - 1 ) ; else if ( table . getColumnType ( columnIndex - 1 ) == VoltType . VARBINARY ) return table . getVarbinary ( columnIndex - 1 ) ; else throw SQLError . get ( SQLError . CONVERSION_NOT_FOUND , table . getColumnType ( columnIndex - 1 ) , "byte[]" ) ; } catch ( SQLException x ) { throw x ; } catch ( Exception x ) { throw SQLError . get ( x ) ; } }
ResultSet object as a byte array in the Java programming language .