Package com.helger.commons.io.file
Enum ERandomAccessFileMode
- All Implemented Interfaces:
Serializable,Comparable<ERandomAccessFileMode>,java.lang.constant.Constable
Represents a set of predefined open modes for RandomAccessFile objects.
- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOpen for reading only.Open for reading and writing.Open for reading and writing, as with"rw", and also require that every update to the file's content or metadata be written synchronously to the underlying storage device.Open for reading and writing, as with"rw", and also require that every update to the file's content be written synchronously to the underlying storage device. -
Method Summary
Modifier and TypeMethodDescriptionstatic ERandomAccessFileModegetFromModeOrNull(String sMode) getMode()static ERandomAccessFileModeReturns the enum constant of this type with the specified name.static ERandomAccessFileMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
READ_ONLY
Open for reading only. -
READ_WRITE
Open for reading and writing. If the file does not already exist then an attempt will be made to create it. -
READ_WRITE_SYNCHRONOUSLY
Open for reading and writing, as with"rw", and also require that every update to the file's content or metadata be written synchronously to the underlying storage device. -
READ_WRITE_SYNCHRONOUSLY_ONLY_CONTENT
Open for reading and writing, as with"rw", and also require that every update to the file's content be written synchronously to the underlying storage device.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getMode
-
getFromModeOrNull
-