public enum OpenOption extends Enum<OpenOption>
Enum Constant and Description |
---|
APPEND
If the file is opened for WRITE access then bytes will be written to the
end of the file rather than the beginning.
|
CREATE
Create a new file if it does not exist.
|
CREATE_NEW
Create a new file, failing if the file already exists.
|
READ
Open for read access.
|
TRUNCATE_EXISTING
If the file already exists and it is opened for WRITE access, then its
length is truncated to 0.
|
WRITE
Open for write access.
|
Modifier and Type | Method and Description |
---|---|
static OpenOption |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OpenOption[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OpenOption APPEND
public static final OpenOption CREATE
public static final OpenOption CREATE_NEW
public static final OpenOption READ
public static final OpenOption TRUNCATE_EXISTING
public static final OpenOption WRITE
public static OpenOption[] values()
for (OpenOption c : OpenOption.values()) System.out.println(c);
public static OpenOption 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 null