Home > Contents > Index >
Utilities.appendFile
Appends data to a disk file.
This method has two variants:
- appendFile (Variant 1) appends a string to a disk file.
- appendFile (Variant 2) appends an array of bytes to a disk file.
Utilities.appendFile
Appends a string to a disk file.
Syntax
public static final boolean appendFile(String fname, String str)Parameters
fname
- The path and file name of the file to append to.
str
- The file data to append, in string form.
Description
The
appendFile
method appends a string to a disk file.Returns
Returns
true
on success,false
on failure.See Also
Utilities.appendFile
Appends an array of bytes to a disk file.
Syntax
public static final boolean appendFile(String fname, byte[] bits, int size)Parameters
fname
- The path and file name of the file to append.
bits
- The file data to append, in a byte array.
size
- The number of bytes to append.
Description
The
appendFile
method appends an array of bytes to a disk file. The file name is internally converted byosSafeSpec()
.Returns
Returns
true
on success,false
on failure.See Also
osSafeSpec
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.