public enum FileExistsMode extends Enum<FileExistsMode>
| Enum Constant and Description |
|---|
APPEND
Append data to any pre-existing files; close after each append.
|
APPEND_NO_FLUSH
Append data to any pre-existing files; do not flush/close after
appending.
|
FAIL
Raise an exception in case the file to be written already exists.
|
IGNORE
If the file already exists, do nothing.
|
REPLACE
If the file already exists, replace it.
|
REPLACE_IF_MODIFIED
If the file already exists, replace it only if the last modified time
is different.
|
| Modifier and Type | Method and Description |
|---|---|
static FileExistsMode |
getForString(String fileExistsModeAsString)
For a given non-null and not-empty input string, this method returns the
corresponding
FileExistsMode. |
static FileExistsMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FileExistsMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FileExistsMode APPEND
public static final FileExistsMode APPEND_NO_FLUSH
public static final FileExistsMode FAIL
public static final FileExistsMode IGNORE
public static final FileExistsMode REPLACE
public static final FileExistsMode REPLACE_IF_MODIFIED
public static FileExistsMode[] values()
for (FileExistsMode c : FileExistsMode.values()) System.out.println(c);
public static FileExistsMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static FileExistsMode getForString(String fileExistsModeAsString)
FileExistsMode. If it cannot be determined, an
IllegalStateException is thrown.fileExistsModeAsString - Must neither be null nor empty