public class UniqueFileStrategy extends Object implements FileStrategy
SimpleDateFormat
to form the appended string to the base file name as well as a suffix
which should be appended last.
A new UniqueFileStrategy( new File( "foo." ), "yyyy-MM-dd", ".log" )
object will return File
objects with file names like
foo.2001-12-24.log
Constructor and Description |
---|
UniqueFileStrategy(File baseFile)
Creation of a new Unique File Strategy ??
|
UniqueFileStrategy(File baseFile,
String pattern)
Creation of a new Unique File Strategy ??
|
UniqueFileStrategy(File baseFile,
String pattern,
String suffix)
Creation of a new Unique File Strategy ??
|
Modifier and Type | Method and Description |
---|---|
File |
nextFile()
Calculate the real file name from the base filename.
|
public UniqueFileStrategy(File baseFile)
baseFile
- the base filepublic UniqueFileStrategy(File baseFile, String pattern)
baseFile
- the base filepattern
- the format patternpublic File nextFile()
nextFile
in interface FileStrategy
Copyright © 1997–2016. All rights reserved.