本文整理汇总了Java中htsjdk.samtools.BAMRecordCodec.setOutputStream方法的典型用法代码示例。如果您正苦于以下问题:Java BAMRecordCodec.setOutputStream方法的具体用法?Java BAMRecordCodec.setOutputStream怎么用?Java BAMRecordCodec.setOutputStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类htsjdk.samtools.BAMRecordCodec
的用法示例。
在下文中一共展示了BAMRecordCodec.setOutputStream方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: write
import htsjdk.samtools.BAMRecordCodec; //导入方法依赖的package包/类
@Override
public void write(DataOutput out) throws IOException {
// In theory, it shouldn't matter whether we give a header to
// BAMRecordCodec or not, since the representation of an alignment in BAM
// doesn't depend on the header data at all. Only its interpretation
// does, and a simple read/write codec shouldn't really have anything to
// say about that. (But in practice, it already does matter for decode(),
// which is why LazyBAMRecordFactory exists.)
final BAMRecordCodec codec = new BAMRecordCodec(record.getHeader());
codec.setOutputStream(new DataOutputWrapper(out));
codec.encode(record);
}
示例2: init
import htsjdk.samtools.BAMRecordCodec; //导入方法依赖的package包/类
private void init(
OutputStream output, SAMFileHeader header, boolean writeHeader)
throws IOException
{
origOutput = output;
compressedOut = new BlockCompressedOutputStream(origOutput, null);
binaryCodec = new BinaryCodec(compressedOut);
recordCodec = new BAMRecordCodec(header);
recordCodec.setOutputStream(compressedOut);
if (writeHeader)
this.writeHeader(header);
}
示例3: write
import htsjdk.samtools.BAMRecordCodec; //导入方法依赖的package包/类
@Override public void write(DataOutput out) throws IOException {
// In theory, it shouldn't matter whether we give a header to
// BAMRecordCodec or not, since the representation of an alignment in BAM
// doesn't depend on the header data at all. Only its interpretation
// does, and a simple read/write codec shouldn't really have anything to
// say about that. (But in practice, it already does matter for decode(),
// which is why LazyBAMRecordFactory exists.)
final BAMRecordCodec codec = new BAMRecordCodec(record.getHeader());
codec.setOutputStream(new DataOutputWrapper(out));
codec.encode(record);
}