Spring Integration

org.springframework.integration.file.support
Enum FileExistsMode

java.lang.Object
  extended by java.lang.Enum<FileExistsMode>
      extended by org.springframework.integration.file.support.FileExistsMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FileExistsMode>

public enum FileExistsMode
extends java.lang.Enum<FileExistsMode>

When writing file, this enumeration indicates what action shall be taken in case the destination file already exists.

Since:
2.2
Author:
Gunnar Hillert

Enum Constant Summary
APPEND
          Append data to any pre-existing files.
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.
 
Method Summary
static FileExistsMode getForString(java.lang.String fileExistsModeAsString)
          For a given non-null and not-empty input string, this method returns the corresponding FileExistsMode.
static FileExistsMode valueOf(java.lang.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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

APPEND

public static final FileExistsMode APPEND
Append data to any pre-existing files.


FAIL

public static final FileExistsMode FAIL
Raise an exception in case the file to be written already exists.


IGNORE

public static final FileExistsMode IGNORE
If the file already exists, do nothing.


REPLACE

public static final FileExistsMode REPLACE
If the file already exists, replace it.

Method Detail

values

public static FileExistsMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FileExistsMode c : FileExistsMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FileExistsMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getForString

public static FileExistsMode getForString(java.lang.String fileExistsModeAsString)
For a given non-null and not-empty input string, this method returns the corresponding FileExistsMode. If it cannot be determined, an IllegalStateException is thrown.

Parameters:
fileExistsModeAsString - Must neither be null nor empty

Spring Integration