private final ResultSetRow unpackBinaryResultSetRow(Field[] fields,Buffer binaryData,int resultSetConcurrency) throws SQLException {
  int numFields=fields.length;
  byte[][] unpackedRowData=new byte[numFields][];
  int nullCount=(numFields + 9) / 8;
  int nullMaskPos=binaryData.getPosition();
  binaryData.setPosition(nullMaskPos + nullCount);
  int bit=4;
  for (int i=0; i < numFields; i++) {
    if ((binaryData.readByte(nullMaskPos) & bit) != 0) {
      unpackedRowData[i]=null;
    }
 else {
      if (resultSetConcurrency != ResultSet.CONCUR_UPDATABLE) {
        extractNativeEncodedColumn(binaryData,fields,i,unpackedRowData);
      }
 else {
        unpackNativeEncodedColumn(binaryData,fields,i,unpackedRowData);
      }
    }
    if (((bit<<=1) & 255) == 0) {
      bit=1;
      nullMaskPos++;
    }
  }
  return new ByteArrayRow(unpackedRowData,getExceptionInterceptor());
}

private final ResultSetRow unpackBinaryResultSetRow ( Field [ ] fields , Buffer binaryData , int resultSetConcurrency ) throws SQLException { int numFields = fields . length ; byte [ ] [ ] unpackedRowData = new byte [ numFields ] [ ] ; int nullCount = ( numFields + 9 ) / 8 ; int nullMaskPos = binaryData . getPosition ( ) ; binaryData . setPosition ( nullMaskPos + nullCount ) ; int bit = 4 ; for ( int i = 0 ; i < numFields ; i ++ ) { if ( ( binaryData . readByte ( nullMaskPos ) & bit ) != 0 ) { unpackedRowData [ i ] = null ; } else { if ( resultSetConcurrency != ResultSet . CONCUR_UPDATABLE ) { extractNativeEncodedColumn ( binaryData , fields , i , unpackedRowData ) ; } else { unpackNativeEncodedColumn ( binaryData , fields , i , unpackedRowData ) ; } } if ( ( ( bit <<= 1 ) & 255 ) == 0 ) { bit = 1 ; nullMaskPos ++ ; } } return new ByteArrayRow ( unpackedRowData , getExceptionInterceptor ( ) ) ; }
un - packs binary - encoded result set data for one row
