public static <K, V> boolean skipHeader(RecordReader<K, V> currRecReader, int headerCount, K key, V value)
      throws IOException {
    while (headerCount > 0) {
      if (!currRecReader.next(key, value)) {
        return false;
      }
      headerCount--;
    }
    return true;
  }
Skip header lines in the table file when reading the record.

@param currRecReader
         Record reader.

@param headerCount
         Header line number of the table files.

@param key
         Key of current reading record.

@param value
         Value of current reading record.

@return Return true if there are 0 or more records left in the file
        after skipping all headers, otherwise return false.
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java