Class HtsgetResponse

java.lang.Object
htsjdk.samtools.util.htsget.HtsgetResponse

public class HtsgetResponse extends Object
Class allowing deserialization from json htsget response, as defined in https://samtools.github.io/hts-specs/htsget.html

This class currently supports version 1.2.0 of the spec

An example response could be as follows { "htsget" : { "format" : "BAM", "urls" : [ { "url" : "data:application/vnd.ga4gh.bam;base64,QkFNAQ==", "class" : "header" }, { "url" : "https://htsget.blocksrv.example/sample1234/run1.bam", "headers" : { "Authorization" : "Bearer xxxx", "Range" : "bytes=65536-1003750" }, "class" : "body" } ], "md5": "abcd" } }

  • Constructor Details

  • Method Details

    • getFormat

      public HtsgetFormat getFormat()
    • getBlocks

      public List<HtsgetResponse.Block> getBlocks()
    • getMd5

      public String getMd5()
    • parse

      public static HtsgetResponse parse(String s)
      Parses HtsgetResponse object from json string
      Parameters:
      s - json string
      Returns:
      parsed HtsgetResponse object
    • getDataStream

      public InputStream getDataStream()
      Lazily generates an InputStream over this response's data from the concatenation of the InputStreams from each of the response's data blocks
      Returns:
      InputStream over this response's data