code: public synchronized void reset(MemoryIntArray intArray) throws IOException {
        _writer.flush();
        _writer.position(DATA_START_POSITION);
        for(int i = 0, cnt = intArray.length(); i < cnt; i++) {
            _writer.writeInt(intArray.get(i));
        }
        _writer.flush();
    }
docs: Resets this ArrayFile with the specified integer array.
  
  @param intArray - the integer array.
  @throws IOException