Implement bwa_java_index function