Package htsjdk.samtools
Class BinaryTagCodec
- java.lang.Object
-
- htsjdk.samtools.BinaryTagCodec
-
public class BinaryTagCodec extends Object
Converter between disk and in-memory representation of a SAMRecord tag.
-
-
Constructor Summary
Constructors Constructor Description BinaryTagCodec(BinaryCodec binaryCodec)
For writing tags.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SAMBinaryTagAndValue
readTags(byte[] binaryRep, int offset, int length, ValidationStringency validationStringency)
Convert tags from little-endian disk representation to in-memory representation.void
writeTag(short tag, Object value, boolean isUnsignedArray)
Write the given tag name and value to disk.
-
-
-
Constructor Detail
-
BinaryTagCodec
public BinaryTagCodec(BinaryCodec binaryCodec)
For writing tags. For reading tags, a BinaryCodec is not used. See readTags() below.- Parameters:
binaryCodec
- where to write the file rep of the tags
-
-
Method Detail
-
writeTag
public void writeTag(short tag, Object value, boolean isUnsignedArray)
Write the given tag name and value to disk.
-
readTags
public static SAMBinaryTagAndValue readTags(byte[] binaryRep, int offset, int length, ValidationStringency validationStringency)
Convert tags from little-endian disk representation to in-memory representation.- Parameters:
binaryRep
- Byte buffer containing file representation of tags.offset
- Where in binaryRep tags start.length
- How many bytes in binaryRep are tag storage.
-
-