public enum FileMode extends Enum<FileMode> implements Enumeration
| Enum Constant and Description | 
|---|
APPEND
Opens the file if it exists and seeks to the end of the file, or creates a new
 file. 
 | 
CREATE
Specifies that the operating system should create a new file. 
 | 
CREATE_NEW
Specifies that the operating system should create a new file. 
 | 
OPEN
Specifies that the operating system should open an existing file. 
 | 
OPEN_OR_CREATE
Specifies that the operating system should open a file if it exists; otherwise, a
 new file should be created. 
 | 
TRUNCATE
Specifies that the operating system should open an existing file. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static FileMode | 
getDefault()
Get the enum constant that is considered to be the default. 
 | 
static FileMode | 
getFromValue(int value)
Get the enum constant that is associated with the given numeric value. 
 | 
int | 
getValue()
Get the numeric value associated with this enum constant. 
 | 
static FileMode | 
valueOf(String name)
Returns the enum constant of this type with the specified name. 
 | 
static FileMode[] | 
values()
Returns an array containing the constants of this enum type, in
the order they are declared. 
 | 
public static final FileMode CREATE_NEW
public static final FileMode CREATE
FileMode.Create is equivalent to requesting
 that if the file does not exist, use FileMode.CREATE_NEW; otherwise, use
 FileMode.TRUNCATE.public static final FileMode OPEN
FileAccess
 enumeration.public static final FileMode OPEN_OR_CREATE
public static final FileMode TRUNCATE
public static final FileMode APPEND
FileMode.Append can be used only in conjunction with
 FileAccess.Write.public static FileMode[] values()
for (FileMode c : FileMode.values()) System.out.println(c);
public static FileMode 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 int getValue()
getValue in interface Enumeration@Nonnull public static FileMode getFromValue(int value)
value - a numeric value.