- size
- the maximum size of the underlying file.
Documentation for this section has not yet been entered.
Type Reason Java.Lang.IllegalArgumentException if the requested size is negative. Java.Nio.Channels.ClosedChannelException if this channel is closed. Java.Nio.Channels.NonWritableChannelException if the channel cannot be written to. Java.IO.IOException if another I/O error occurs.
Truncates the file underlying this channel to a given size. Any bytes beyond the given size are removed from the file. If there are no bytes beyond the given size then the file contents are unmodified.
If the file position is currently greater than the given size, then it is set to the new size.