Package com.pdftools.sys
Enum FileStream.Mode
- java.lang.Object
-
- java.lang.Enum<FileStream.Mode>
-
- com.pdftools.sys.FileStream.Mode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FileStream.Mode>
- Enclosing class:
- FileStream
public static enum FileStream.Mode extends java.lang.Enum<FileStream.Mode>
The file access mode.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description READ_ONLY
Open for reading only.READ_WRITE_APPEND
Open for reading and writing.READ_WRITE_D
Open for reading and writing.READ_WRITE_NEW
Open for reading and writing.READ_WRITE_S
Open for reading and writing.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
static FileStream.Mode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FileStream.Mode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READ_ONLY
public static final FileStream.Mode READ_ONLY
Open for reading only. Invoking any of the write methods of the resulting object will cause an IOException to be thrown.
-
READ_WRITE_NEW
public static final FileStream.Mode READ_WRITE_NEW
Open for reading and writing. The existing file content will be deleted. If the file does not already exist then an attempt will be made to create it.
-
READ_WRITE_APPEND
public static final FileStream.Mode READ_WRITE_APPEND
Open for reading and writing. The newly added content will be appended to the file. If the file does not already exist then an attempt will be made to create it.
-
READ_WRITE_S
public static final FileStream.Mode READ_WRITE_S
Open for reading and writing. Require that every update to the file's content or metadata be written synchronously to the underlying storage device.
-
READ_WRITE_D
public static final FileStream.Mode READ_WRITE_D
Open for reading and writing. Require that every update to the file's content be written synchronously to the underlying storage device.
-
-
Method Detail
-
values
public static FileStream.Mode[] 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 (FileStream.Mode c : FileStream.Mode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FileStream.Mode 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 namejava.lang.NullPointerException
- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<FileStream.Mode>
-
-