Package com.google.cloud.hadoop.gcsio
Enum CreateFileOptions.WriteMode
- java.lang.Object
-
- java.lang.Enum<CreateFileOptions.WriteMode>
-
- com.google.cloud.hadoop.gcsio.CreateFileOptions.WriteMode
-
- All Implemented Interfaces:
Serializable,Comparable<CreateFileOptions.WriteMode>
- Enclosing class:
- CreateFileOptions
public static enum CreateFileOptions.WriteMode extends Enum<CreateFileOptions.WriteMode>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPENDWrite new bytes to the end of the existing file rather than the beginning.CREATE_NEWCreates a new file for write and fails if file already exists.OVERWRITECreates a new file for write or overwrites an existing file if it already exists.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CreateFileOptions.WriteModevalueOf(String name)Returns the enum constant of this type with the specified name.static CreateFileOptions.WriteMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
APPEND
public static final CreateFileOptions.WriteMode APPEND
Write new bytes to the end of the existing file rather than the beginning.
-
CREATE_NEW
public static final CreateFileOptions.WriteMode CREATE_NEW
Creates a new file for write and fails if file already exists.
-
OVERWRITE
public static final CreateFileOptions.WriteMode OVERWRITE
Creates a new file for write or overwrites an existing file if it already exists.
-
-
Method Detail
-
values
public static CreateFileOptions.WriteMode[] 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 (CreateFileOptions.WriteMode c : CreateFileOptions.WriteMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CreateFileOptions.WriteMode 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
-
-