- newLength
- the new file length in bytes.
Type Reason Java.Lang.IllegalArgumentException if newLength . Java.IO.IOException if this file is closed or another I/O error occurs.
Sets the length of this file to newLength. If the current file is smaller, it is expanded but the contents from the previous end of the file to the new end are undefined. The file is truncated if its current size is bigger than newLength. If the current file pointer position is in the truncated part, it is set to the end of the file.