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 PhenopacketFormatsniff(byte[] payload) Make an educated guess ofPhenopacketFormatbased on givenpayload.static PhenopacketFormatsniff(InputStream input) Make an educated guess ofPhenopacketFormatpresent in giveninput.
-
Method Details
-
sniff
Make an educated guess ofPhenopacketFormatbased 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 ofPhenopacketFormatpresent in giveninput.- Parameters:
input- anInputStreamthat supportsInputStream.mark(int).- Returns:
- the sniffed
PhenopacketFormat. - Throws:
IOException- in case an error occurs while reading theinput.SniffException- if theinputdoes not supportInputStream.mark(int).
-