size
Modifies the size of the File for which this Write stream belongs.
If new is greater than the current FileStream.size, then the File is extended whereby the extended portion reads as 0
bytes (undefined). If new is less than the current FileStream.size, then the File is truncated and data beyond new is lost.
If and only if the current FileStream.position is greater than new, then the FileStream.position will be set to new. Otherwise, the current FileStream.position will remain unmodified.
Return
The Write stream for chaining operations.
Parameters
new
The desired size.
Throws
IllegalArgumentException
If new is less than 0.
If an I/O error occurs, or the stream is closed.