samtools/htsjdk — pull request #3 by lindenb (2014-05-12 11:55:26+00:00)
Title: factory bam writer

If I'm not wrong BAMFileWriter is private. There is currently no way to create a BAMFileWriter using a stream (stdout) using a SAMFileWriterFactory.

I created a private method 'makeBamOrSAMWriter' using an ouputstream and a parameter 'binary'. If binary==false, the factory uses a SAMTextWriter, else it uses a BAMFileWriter (line 260)

the old method makeSAMWriter now calls makeBamOrSAMWriter with binary=false (line 232)