code: private static void writeInt(byte[] buffer, int offset, int value) {
      buffer[offset    ] = (byte) (value >> 24);
      buffer[offset + 1] = (byte) (value >> 16);
      buffer[offset + 2] = (byte) (value >> 8);
      buffer[offset + 3] = (byte) value;
    }
docs: Stores an {@code int} in the {@code byte[]}. The behavior is equivalent to calling
  {@link RandomAccessFile#writeInt}.