public class FileUtils extends Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static File |
appendDataToTempFile(File file,
String dataToAppend)
Appends the given data to the file specified in the input and returns the
reference to the file.
|
static File |
createTempFileForTesting(String fileName)
Returns a reference to the file created with the given file name in the
System's temporary directory.
|
static File |
createTempFileForTesting(String fileName,
String data)
Creates a file with the given name in the System's temporary directory.
|
static File |
generateRandomAsciiFile(long byteSize)
Generate a random ASCII file of the specified number of bytes.
|
static File |
generateRandomAsciiFile(long byteSize,
boolean deleteOnExit) |
public static File createTempFileForTesting(String fileName) throws IOException
fileName
- IOException
public static File createTempFileForTesting(String fileName, String data) throws IOException
fileName
- data
- IOException
public static File appendDataToTempFile(File file, String dataToAppend) throws IOException
file
- dataToAppend
- IOException
public static File generateRandomAsciiFile(long byteSize) throws IOException
IOException
public static File generateRandomAsciiFile(long byteSize, boolean deleteOnExit) throws IOException
IOException
Copyright © 2020. All rights reserved.