Class BinaryTagCodec


  • public class BinaryTagCodec
    extends Object
    Converter between disk and in-memory representation of a SAMRecord tag.
    • 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.