Package net.sf.samtools

Examples of net.sf.samtools.SAMTextHeaderCodec


  }

  private static byte[] toByteArray(SAMFileHeader samFileHeader) {
    ExposedByteArrayOutputStream headerBodyOS = new ExposedByteArrayOutputStream();
    OutputStreamWriter w = new OutputStreamWriter(headerBodyOS);
    new SAMTextHeaderCodec().encode(w, samFileHeader);
    try {
      w.close();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
View Full Code Here


    byte[] bytes = new byte[size];
    dis.readFully(bytes);

    BufferedLineReader r = new BufferedLineReader(new ByteArrayInputStream(
        bytes));
    return new SAMTextHeaderCodec().decode(r, id);
  }
View Full Code Here

  }

  private String toString(SAMFileHeader h) {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    OutputStreamWriter w = new OutputStreamWriter(baos);
    new SAMTextHeaderCodec().encode(w, h);
    try {
      w.close();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
View Full Code Here

TOP

Related Classes of net.sf.samtools.SAMTextHeaderCodec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.