Truncates or extends the file to newLength bytes.
If the current position is greater than newLength, position is set to newLength (matching java.io.RandomAccessFile.setLength).
java.io.RandomAccessFile.setLength