Package htsjdk.samtools.cram.compression.nametokenisation

# Class TokenStreams

java.lang.Object
htsjdk.samtools.cram.compression.nametokenisation.TokenStreams

public class TokenStreams extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final byte`
`DUP_PREVIOUS_STREAM_FLAG_MASK`
`static final byte`
`NEW_POSITION_FLAG_MASK`
`static final byte`
`TOKEN_CHAR`
`static final byte`
`TOKEN_DELTA`
`static final byte`
`TOKEN_DELTA0`
`static final byte`
`TOKEN_DIFF`
`static final byte`
`TOKEN_DIGITS`
`static final byte`
`TOKEN_DIGITS0`
`static final byte`
`TOKEN_DUP`
`static final byte`
`TOKEN_DZLEN`
`static final byte`
`TOKEN_END`
`static final byte`
`TOKEN_MATCH`
`static final byte`
`TOKEN_NOP`
`static final byte`
`TOKEN_STRING`
`static final byte`
`TOKEN_TYPE`
`static final int`
`TOTAL_TOKEN_TYPES`
`static final byte`
`TYPE_TOKEN_FLAG_MASK`

## Constructor Summary

Constructors
Constructor
Description
`TokenStreams(ByteBuffer inputByteBuffer, int useArith, int numNames)`
The outer index corresponds to the (column) position in a name (starting at index 0).

## Method Summary

Modifier and Type
Method
Description
`ByteBuffer`
`getStream(int tokenPosition, int tokenType)`
`ByteBuffer[]`
`getStreamsForPos(int pos)`

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

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

## Field Details

### TOKEN_TYPE

public static final byte TOKEN_TYPE

See Also:
  - Constant Field Values

### TOKEN_STRING

public static final byte TOKEN_STRING

See Also:
  - Constant Field Values

### TOKEN_CHAR

public static final byte TOKEN_CHAR

See Also:
  - Constant Field Values

### TOKEN_DIGITS0

public static final byte TOKEN_DIGITS0

See Also:
  - Constant Field Values

### TOKEN_DZLEN

public static final byte TOKEN_DZLEN

See Also:
  - Constant Field Values

### TOKEN_DUP

public static final byte TOKEN_DUP

See Also:
  - Constant Field Values

### TOKEN_DIFF

public static final byte TOKEN_DIFF

See Also:
  - Constant Field Values

### TOKEN_DIGITS

public static final byte TOKEN_DIGITS

See Also:
  - Constant Field Values

### TOKEN_DELTA

public static final byte TOKEN_DELTA

See Also:
  - Constant Field Values

### TOKEN_DELTA0

public static final byte TOKEN_DELTA0

See Also:
  - Constant Field Values

### TOKEN_MATCH

public static final byte TOKEN_MATCH

See Also:
  - Constant Field Values

### TOKEN_NOP

public static final byte TOKEN_NOP

See Also:
  - Constant Field Values

### TOKEN_END

public static final byte TOKEN_END

See Also:
  - Constant Field Values

### TOTAL_TOKEN_TYPES

public static final int TOTAL_TOKEN_TYPES

See Also:
  - Constant Field Values

### TYPE_TOKEN_FLAG_MASK

public static final byte TYPE_TOKEN_FLAG_MASK

See Also:
  - Constant Field Values

### DUP_PREVIOUS_STREAM_FLAG_MASK

public static final byte DUP_PREVIOUS_STREAM_FLAG_MASK

See Also:
  - Constant Field Values

### NEW_POSITION_FLAG_MASK

public static final byte NEW_POSITION_FLAG_MASK

See Also:
  - Constant Field Values

## Constructor Details

### TokenStreams

public TokenStreams(ByteBuffer inputByteBuffer, int useArith, int numNames)
The outer index corresponds to the (column) position in a name (starting at index 0). The inner index corresponds to the token type. Each element in this list of lists is a ByteBuffer of tokens.

Parameters:
  `inputByteBuffer` - - the input buffer of token streams
  `useArith` - - true to use range coding; false for rANS coding
  `numNames` - - the number of read names in the slice for which this token stream is being created

## Method Details

### getStreamsForPos

public ByteBuffer[] getStreamsForPos(int pos)

### getStream

public ByteBuffer getStream(int tokenPosition, int tokenType)