Enum RandomAccessDataFactory.AccessType
- java.lang.Object
-
- java.lang.Enum<RandomAccessDataFactory.AccessType>
-
- de.bernd_michaely.common.io.random.RandomAccessDataFactory.AccessType
-
- All Implemented Interfaces:
Serializable
,Comparable<RandomAccessDataFactory.AccessType>
- Enclosing class:
- RandomAccessDataFactory
public static enum RandomAccessDataFactory.AccessType extends Enum<RandomAccessDataFactory.AccessType>
This enum describes different methods to access files through aRandomAccessData
interface.- Since:
- 2.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description RANDOM
This implementation type for file based instances is performance optimized for efficiently jumping around in a file (possibly through a slow I/O connection) and reading small portions of a file.STREAM
This implementation type for file based instances is performance optimized for reading a file fully sequentially through aRandomAccessData
interface.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RandomAccessDataFactory.AccessType
valueOf(String name)
Returns the enum constant of this type with the specified name.static RandomAccessDataFactory.AccessType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RANDOM
public static final RandomAccessDataFactory.AccessType RANDOM
This implementation type for file based instances is performance optimized for efficiently jumping around in a file (possibly through a slow I/O connection) and reading small portions of a file. It uses aRandomAccessFile
internally.
-
STREAM
public static final RandomAccessDataFactory.AccessType STREAM
This implementation type for file based instances is performance optimized for reading a file fully sequentially through aRandomAccessData
interface. It uses abuffered
FileInputStream
internally.
-
-
Method Detail
-
values
public static RandomAccessDataFactory.AccessType[] 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 (RandomAccessDataFactory.AccessType c : RandomAccessDataFactory.AccessType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RandomAccessDataFactory.AccessType valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-