Package htsjdk.samtools.cram.structure

# Class ReadTag

java.lang.Object
htsjdk.samtools.cram.structure.ReadTag

All Implemented Interfaces:
  `Comparable<ReadTag>`

public class ReadTag extends Object implements Comparable<ReadTag>
CRAM counterpart of `SAMTag`.

## Field Summary

Fields
Modifier and Type
Field
Description
`String`
`keyType3Bytes`
`int`
`keyType3BytesAsInt`

## Constructor Summary

Constructors
Constructor
Description
`ReadTag(int id, byte[] dataAsByteArray, ValidationStringency validationStringency)`

## Method Summary

Modifier and Type
Method
Description
`int`
`compareTo(ReadTag o)`
`SAMRecord.SAMTagAndValue`
`createSAMTag()`
`static ReadTag`
`deriveTypeFromKeyAndType(String keyAndType, Object value)`
`static ReadTag`
`deriveTypeFromValue(String key, Object value)`
`boolean`
`equals(Object o)`
`byte`
`getIndex()`
`String`
`getKey()`
`String`
`getKeyAndType()`
`Object`
`getValue()`
`byte[]`
`getValueAsByteArray()`
`int`
`hashCode()`
`static String`
`intToNameType3Bytes(int value)`
`static String`
`intToNameType4Bytes(int value)`
`static int`
`name3BytesToInt(byte[] name)`
`static int`
`nameType3BytesToInt(String name, char type)`
`static Object`
`readSingleValue(byte tagType, ByteBuffer byteBuffer, ValidationStringency validationStringency)`
`void`
`setIndex(byte i)`
`static byte[]`
`writeSingleValue(byte tagType, Object value, boolean isUnsignedArray)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### keyType3Bytes

public String keyType3Bytes

### keyType3BytesAsInt

public int keyType3BytesAsInt

## Constructor Details

### ReadTag

public ReadTag(int id, byte[] dataAsByteArray, ValidationStringency validationStringency)

## Method Details

### name3BytesToInt

public static int name3BytesToInt(byte[] name)

### nameType3BytesToInt

public static int nameType3BytesToInt(String name, char type)

### intToNameType3Bytes

public static String intToNameType3Bytes(int value)

### intToNameType4Bytes

public static String intToNameType4Bytes(int value)

### createSAMTag

public SAMRecord.SAMTagAndValue createSAMTag()

### deriveTypeFromKeyAndType

public static ReadTag deriveTypeFromKeyAndType(String keyAndType, Object value)

### deriveTypeFromValue

public static ReadTag deriveTypeFromValue(String key, Object value)

### getKey

public String getKey()

### compareTo

public int compareTo(ReadTag o)

Specified by:
  `compareTo` in interface `Comparable<ReadTag>`

### getValue

public Object getValue()

### getKeyAndType

public String getKeyAndType()

### getValueAsByteArray

public byte[] getValueAsByteArray()

### setIndex

public void setIndex(byte i)

### getIndex

public byte getIndex()

### writeSingleValue

public static byte[] writeSingleValue(byte tagType, Object value, boolean isUnsignedArray)

### readSingleValue

public static Object readSingleValue(byte tagType, ByteBuffer byteBuffer, ValidationStringency validationStringency)

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`