|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.item.util.FileUtils
public final class FileUtils
Utility methods for files used in batch processing.
| Method Summary | |
|---|---|
static boolean |
createNewFile(File file)
Create a new file if it doesn't already exist. |
static void |
setUpOutputFile(File file,
boolean restarted,
boolean overwriteOutputFile)
Deprecated. use the version with explicit append parameter instead. Here append=false is assumed. |
static void |
setUpOutputFile(File file,
boolean restarted,
boolean append,
boolean overwriteOutputFile)
Set up output file for batch processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void setUpOutputFile(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)
IllegalArgumentException - when file is null
ItemStreamException - when starting output file processing, file exists and flag "overwriteOutputFile" is
set to false
ItemStreamException - when unable to create file or file is not writable
public static void setUpOutputFile(File file,
boolean restarted,
boolean overwriteOutputFile)
public static boolean createNewFile(File file)
throws IOException
file - the file to create on the filesystem
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||