public final class FileUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
createNewFile(java.io.File file)
Create a new file if it doesn't already exist.
|
static void |
setUpOutputFile(java.io.File file,
boolean restarted,
boolean overwriteOutputFile)
Deprecated.
use the version with explicit append parameter instead. Here append=false is assumed.
|
static void |
setUpOutputFile(java.io.File file,
boolean restarted,
boolean append,
boolean overwriteOutputFile)
Set up output file for batch processing.
|
public static void setUpOutputFile(java.io.File file,
boolean restarted,
boolean append,
boolean overwriteOutputFile)
file - file to be set uprestarted - true signals that we are restarting output file processingappend - true signals input file may already exist (but doesn't have to)overwriteOutputFile - If set to true, output file will be overwritten (this flag is ignored when processing
is restart)@Deprecated
public static void setUpOutputFile(java.io.File file,
boolean restarted,
boolean overwriteOutputFile)
file - file to be set uprestarted - true signals that we are restarting output file processingoverwriteOutputFile - If set to true, output file will be overwritten (this flag is ignored when processing
is restart)java.lang.IllegalArgumentException - when file is nullItemStreamException - when starting output file processing, file exists and flag "overwriteOutputFile" is
set to falseItemStreamException - when unable to create file or file is not writablepublic static boolean createNewFile(java.io.File file)
throws java.io.IOException
file - the file to create on the filesystemjava.io.IOException - is thrown if error occurs during creation and file
does not exist.