private void writeFromArray(
     ArrayAccess arrayAccess, int readPosition, long writePosition, int length)
     throws ApfloatRuntimeException {
   ArrayAccess writeArrayAccess = getArray(WRITE, writePosition, length);
   System.arraycopy(
       arrayAccess.getData(),
       arrayAccess.getOffset() + readPosition,
       writeArrayAccess.getData(),
       writeArrayAccess.getOffset(),
       length);
   writeArrayAccess.close();
 }
 private void readToArray(
     long readPosition, ArrayAccess arrayAccess, int writePosition, int length)
     throws ApfloatRuntimeException {
   ArrayAccess readArrayAccess = getArray(READ, readPosition, length);
   System.arraycopy(
       readArrayAccess.getData(),
       readArrayAccess.getOffset(),
       arrayAccess.getData(),
       arrayAccess.getOffset() + writePosition,
       length);
   readArrayAccess.close();
 }