Package org.apache.commons.vfs2.util
Enum RandomAccessMode
- All Implemented Interfaces:
Serializable
,Comparable<RandomAccessMode>
An enumerated type representing the modes of a random access content.
TODO Replace with AccessMode
.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic RandomAccessMode
from
(AccessMode... accessModes) Converts an array ofAccessMode
into a RandomAccessMode.boolean
Tests the read flag.boolean
Tests the write flag.Converts this instance to an array ofAccessMode
.static RandomAccessMode
Returns the enum constant of this type with the specified name.static RandomAccessMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
READ
Read access mode. -
READWRITE
Read-write access mode.
-
-
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
-
from
Converts an array ofAccessMode
into a RandomAccessMode.- Parameters:
accessModes
- AccessMode array, onlyAccessMode.READ
andAccessMode.WRITE
are supported.- Returns:
- A RandomAccessMode.
- Since:
- 2.10.0
-
getModeString
-
requestRead
Tests the read flag.- Returns:
- true for read.
-
requestWrite
Tests the write flag.- Returns:
- true for write.
-
toAccessModes
Converts this instance to an array ofAccessMode
.- Returns:
- an array of
AccessMode
. - Since:
- 2.10.0
-