# Class CramIntArray

java.lang.Object
htsjdk.samtools.cram.io.CramIntArray

public class CramIntArray extends Object
Methods to read and write CRAM array of integers data type.

## Constructor Summary

Constructors
Constructor
Description
`CramIntArray()`

## Method Summary

Modifier and Type
Method
Description
`static int[]`
`array(InputStream inputStream)`
Read CRAM int array from a `InputStream`.
`static List<Integer>`
`arrayAsList(InputStream inputStream)`
Read CRAM int array from a `InputStream` as a List.
`static int`
`write(int[] array, OutputStream outputStream)`
Write CRAM int array to a `OutputStream`.
`static int`
`write(List<Integer> intList, OutputStream outputStream)`
Write CRAM int List to a `OutputStream`.

### Methods inherited from class Object

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

## Constructor Details

### CramIntArray

public CramIntArray()

## Method Details

### array

public static int[] array(InputStream inputStream)
Read CRAM int array from a `InputStream`.

Parameters:
  `inputStream` - the inputs stream to read from
Returns:
  array of integers from the input stream

### arrayAsList

public static List<Integer> arrayAsList(InputStream inputStream)
Read CRAM int array from a `InputStream` as a List.

Parameters:
  `inputStream` - the inputs stream to read from
Returns:
  List of integers from the input stream

### write

public static int write(List<Integer> intList, OutputStream outputStream)
Write CRAM int List to a `OutputStream`.

Parameters:
  `intList` - the List to be written
  `outputStream` - the output stream to write to
Returns:
  the number of bits written out

### write

public static int write(int[] array, OutputStream outputStream)
Write CRAM int array to a `OutputStream`.

Parameters:
  `array` - the array to be written
  `outputStream` - the output stream to write to
Returns:
  the number of bits written out