public enum FileMode extends Enum<FileMode>
Enum Constant and Description |
---|
r
以只读方式打开。
|
rw
打开以便读取和写入。
|
rwd
打开以便读取和写入,相对于 "rw","rwd" 还要求对“文件的内容”的每个更新都同步写入到基础存储设备。
|
rws
打开以便读取和写入。
|
Modifier and Type | Method and Description |
---|---|
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 r
public static final FileMode rw
public static final FileMode rws
public static final FileMode rwd
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 nullCopyright © 2024. All rights reserved.