code: private static void writeInt(int value, byte[] array, int offset) {
      for (int i = 0; i < 4; i++) {
        array[offset + i] = (byte) (value >>> (8 * i));
      }
    }
docs: Writes an number into an array using 4 bytes.
  
  @param value the number to write
  @param array the byte array
  @param offset the offset