Package htsjdk.samtools.util.htsget
Class HtsgetResponse
java.lang.Object
htsjdk.samtools.util.htsget.HtsgetResponse
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" } }
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionHtsgetResponse
(HtsgetFormat format, List<HtsgetResponse.Block> blocks, String md5) -
Method Summary
Modifier and TypeMethodDescriptionLazily generates an InputStream over this response's data from the concatenation of the InputStreams from each of the response's data blocksgetMd5()
static HtsgetResponse
Parses HtsgetResponse object from json string
-
Constructor Details
-
HtsgetResponse
-
-
Method Details
-
getFormat
-
getBlocks
-
getMd5
-
parse
Parses HtsgetResponse object from json string- Parameters:
s
- json string- Returns:
- parsed HtsgetResponse object
-
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
-