org.opends.server.types
Enum ExistingFileBehavior

java.lang.Object
  extended by java.lang.Enum<ExistingFileBehavior>
      extended by org.opends.server.types.ExistingFileBehavior
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ExistingFileBehavior>

@PublicAPI(stability=UNCOMMITTED,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=true)
public enum ExistingFileBehavior
extends java.lang.Enum<ExistingFileBehavior>

This enumeration defines the set of possible behaviors that should be taken when attempting to write to a file that already exists.


Enum Constant Summary
APPEND
          The file behavior that indicates that the data written should be appended to any existing file.
FAIL
          The file behavior that indicates that the write should fail if the specified file already exists.
OVERWRITE
          The file behavior that indicates that the data written should overwrite any existing file.
 
Method Summary
 java.lang.String getName()
          Retrieves the name for this existing file behavior.
 java.lang.String toString()
          Retrieves a string representation of this existing file behavior.
static ExistingFileBehavior valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ExistingFileBehavior[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

APPEND

public static final ExistingFileBehavior APPEND
The file behavior that indicates that the data written should be appended to any existing file.


OVERWRITE

public static final ExistingFileBehavior OVERWRITE
The file behavior that indicates that the data written should overwrite any existing file.


FAIL

public static final ExistingFileBehavior FAIL
The file behavior that indicates that the write should fail if the specified file already exists.

Method Detail

values

public static ExistingFileBehavior[] 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 (ExistingFileBehavior c : ExistingFileBehavior.values())
    System.out.println(c);

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

valueOf

public static ExistingFileBehavior 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

getName

public java.lang.String getName()
Retrieves the name for this existing file behavior.

Returns:
The name for this existing file behavior.

toString

public java.lang.String toString()
Retrieves a string representation of this existing file behavior.

Overrides:
toString in class java.lang.Enum<ExistingFileBehavior>
Returns:
A string representation of this existing file behavior.