/** * @param nRef Number of reference sequences. If zero is passed then header is not written. * This is useful in sharded writing as we only want the header written for the first shard. * * @param output BAM index output stream. This stream will be closed when BinaryBAMIndexWriter.close() is called. */ public BinaryBAMShardIndexWriter(final int nRef, final OutputStream output) { try { codec = new BinaryCodec(output); if (nRef > 0) { writeHeader(nRef); } } catch (final Exception e) { throw new SAMException("Exception opening output stream", e); } }
/** * @param nRef Number of reference sequences. If zero is passed then header is not written. * This is useful in sharded writing as we only want the header written for the first shard. * * @param output BAM index output stream. This stream will be closed when BinaryBAMIndexWriter.close() is called. */ public BinaryBAMShardIndexWriter(final int nRef, final OutputStream output) { try { codec = new BinaryCodec(output); if (nRef > 0) { writeHeader(nRef); } } catch (final Exception e) { throw new SAMException("Exception opening output stream", e); } }