Package com.hierynomus.mssmb2
Enum SMB2CreateDisposition
- java.lang.Object
-
- java.lang.Enum<SMB2CreateDisposition>
-
- com.hierynomus.mssmb2.SMB2CreateDisposition
-
- All Implemented Interfaces:
EnumWithValue<SMB2CreateDisposition>
,java.io.Serializable
,java.lang.Comparable<SMB2CreateDisposition>
public enum SMB2CreateDisposition extends java.lang.Enum<SMB2CreateDisposition> implements EnumWithValue<SMB2CreateDisposition>
[MS-SMB2].pdf 2.2.13 SMB2 CREATE Request - CreateDispositionDefines the action the server MUST take if the file that is specified in the name field already exists. For opening named pipes, this field may be set to any value by the client and MUST be ignored by the server. For other files, this field MUST contain one of the following values.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.hierynomus.protocol.commons.EnumWithValue
EnumWithValue.EnumUtils
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FILE_CREATE
If the file already exists, fail the operation; otherwise, create the file.FILE_OPEN
If the file already exists, return success; otherwise, fail the operation.FILE_OPEN_IF
Open the file if it already exists; otherwise, create the file.FILE_OVERWRITE
Overwrite the file if it already exists; otherwise, fail the operation.FILE_OVERWRITE_IF
Overwrite the file if it already exists; otherwise, create the file.FILE_SUPERSEDE
If the file already exists, supersede it.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getValue()
static SMB2CreateDisposition
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SMB2CreateDisposition[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FILE_SUPERSEDE
public static final SMB2CreateDisposition FILE_SUPERSEDE
If the file already exists, supersede it. Otherwise, create the file. This value SHOULD NOT be used for a printer object.
-
FILE_OPEN
public static final SMB2CreateDisposition FILE_OPEN
If the file already exists, return success; otherwise, fail the operation. MUST NOT be used for a printer object.
-
FILE_CREATE
public static final SMB2CreateDisposition FILE_CREATE
If the file already exists, fail the operation; otherwise, create the file.
-
FILE_OPEN_IF
public static final SMB2CreateDisposition FILE_OPEN_IF
Open the file if it already exists; otherwise, create the file. This value SHOULD NOT be used for a printer object.
-
FILE_OVERWRITE
public static final SMB2CreateDisposition FILE_OVERWRITE
Overwrite the file if it already exists; otherwise, fail the operation. MUST NOT be used for a printer object.
-
FILE_OVERWRITE_IF
public static final SMB2CreateDisposition FILE_OVERWRITE_IF
Overwrite the file if it already exists; otherwise, create the file. This value SHOULD NOT be used for a printer object.
-
-
Method Detail
-
values
public static SMB2CreateDisposition[] 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 (SMB2CreateDisposition c : SMB2CreateDisposition.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SMB2CreateDisposition 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
-
getValue
public long getValue()
- Specified by:
getValue
in interfaceEnumWithValue<SMB2CreateDisposition>
-
-