Class FormatSniffer
java.lang.Object
org.phenopackets.phenopackettools.util.format.FormatSniffer
Make an educated guess of the format of a top-level element of Phenopacket schema.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PhenopacketFormat
sniff
(byte[] payload) Make an educated guess ofPhenopacketFormat
based on givenpayload
.static PhenopacketFormat
sniff
(InputStream input) Make an educated guess ofPhenopacketFormat
present in giveninput
.
-
Method Details
-
sniff
Make an educated guess ofPhenopacketFormat
based on givenpayload
.- Parameters:
payload
- buffer with a certain number of bytes from the front end of the input.- Returns:
- the sniffed
PhenopacketFormat
.
-
sniff
Make an educated guess ofPhenopacketFormat
present in giveninput
.- Parameters:
input
- anInputStream
that supportsInputStream.mark(int)
.- Returns:
- the sniffed
PhenopacketFormat
. - Throws:
IOException
- in case an error occurs while reading theinput
.SniffException
- if theinput
does not supportInputStream.mark(int)
.
-