### Question:
BamManager implements AutoCloseable { public SAMFileHeader getHeader() throws IOException { init(); return samReader.getFileHeader(); } BamManager(Path bamFilePath);  BamManager(Path bamFilePath, Path refFilePath); Path createIndex(); Path createIndex(Path outputIndex); SAMFileHeader getHeader(); Path calculateBigWigCoverage(); Path calculateBigWigCoverage(Path bigWigPath, int windowSize); String header(); byte[] compressedHeader(); List<SAMRecord> query(AlignmentFilters<SAMRecord> filters); List<SAMRecord> query(AlignmentFilters<SAMRecord> filters, AlignmentOptions options); List<T> query(AlignmentFilters<SAMRecord> filters, AlignmentOptions options, Class<T> clazz); List<SAMRecord> query(Region region); List<SAMRecord> query(Region region, AlignmentOptions options); List<SAMRecord> query(Region region, AlignmentFilters<SAMRecord> filters, AlignmentOptions options); List<T> query(Region region, AlignmentFilters<SAMRecord> filters, AlignmentOptions options, Class<T> clazz); BamIterator<SAMRecord> iterator(); BamIterator<SAMRecord> iterator(AlignmentOptions options); BamIterator<SAMRecord> iterator(AlignmentFilters<SAMRecord> filters, AlignmentOptions options); BamIterator<T> iterator(AlignmentFilters<SAMRecord> filters, AlignmentOptions options, Class<T> clazz); BamIterator<SAMRecord> iterator(Region region); BamIterator<SAMRecord> iterator(Region region, AlignmentOptions options); BamIterator<SAMRecord> iterator(Region region, AlignmentFilters<SAMRecord> filters, AlignmentOptions options); BamIterator<T> iterator(Region region, AlignmentFilters<SAMRecord> filters, AlignmentOptions options, Class<T> clazz); List<Chunk> getChunks(Region region); List<String> getBreakpoints(Region region); RegionCoverage coverage(Region region, int windowSize); RegionCoverage coverage(Region region, AlignmentFilters<SAMRecord> filters, AlignmentOptions options); AlignmentGlobalStats stats(); AlignmentGlobalStats stats(Region region, AlignmentFilters<SAMRecord> filters, AlignmentOptions options); @Override void close(); Path getBamFile(); BamManager setBamFile(Path bamFilePath); static final int DEFAULT_WINDOW_SIZE; static final int MAX_NUM_RECORDS; static final int MAX_REGION_COVERAGE; static final String COVERAGE_BIGWIG_EXTENSION; }### Answer:
@Test public void readCram() throws IOException { String cram = getClass().getResource("/cram/cram_with_crai_index.cram").getFile(); String reference = getClass().getResource("/cram/hg19mini.fasta").getFile(); BamManager bamManager = new BamManager(Paths.get(cram), Paths.get(reference)); System.out.println(bamManager.getHeader()); }