Class CramIntArray


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

      • CramIntArray

        public CramIntArray()
    • Method Detail

      • 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