File.setLength

Overview | Methods | This Package | All Packages

File.setLength

Sets the length of this file to the specified value.

Syntax

public void setLength( long value )

Parameters

value

The new length of the file.

Exceptions

WinIOException thrown if an error occurs or if the file has been closed.

Remarks

If this value is less than the current length of the file, the file is truncated. If it is larger than the current length of the file, the file is expanded. If the file is expanded, the contents of the file between the old and the new length are undefined.

See Also   IByteStream.setLength, getLength