- All Implemented Interfaces:
Serializable,Comparable<DialectVersion>,Constable
Enumeration of SMB protocol dialect versions supported by JCIFS.
This includes legacy SMB1/CIFS as well as modern SMB2/SMB3 dialects.
- Author:
- mbechler
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if this dialect version is at least the specified versionbooleanCheck if this dialect version is at most the specified versionfinal intGet the SMB2 dialect identifierfinal booleanisSMB2()Check if this is an SMB2 dialect versionstatic DialectVersionmax(DialectVersion a, DialectVersion b) Get the maximum of two dialect versionsstatic DialectVersionmin(DialectVersion a, DialectVersion b) Get the minimum of two dialect versionsstatic Set<DialectVersion>range(DialectVersion min, DialectVersion max) Creates a range of dialect versions between min and max.static DialectVersionReturns the enum constant of this class with the specified name.static DialectVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SMB1
Legacy SMB1/CIFS -
SMB202
SMB 2.02 - Windows Vista+ -
SMB210
SMB 2.1 - Windows 7/Server 2008R2 -
SMB300
SMB 3.0 - Windows 8/Server 2012 -
SMB302
SMB 3.0.2 - Windows 8.1/Server 2012R2 -
SMB311
SMB 3.1.1 - Windows 10/Server 2016
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isSMB2
public final boolean isSMB2()Check if this is an SMB2 dialect version- Returns:
- the smb2
-
getDialect
public final int getDialect()Get the SMB2 dialect identifier- Returns:
- the dialect
-
atLeast
Check if this dialect version is at least the specified version- Parameters:
v- the version to compare against- Returns:
- whether this version is a least the given one
-
atMost
Check if this dialect version is at most the specified version- Parameters:
v- the version to compare against- Returns:
- whether this version is a most the given one
-
min
Get the minimum of two dialect versions- Parameters:
a- the first version to compareb- the second version to compare- Returns:
- smaller of the two versions
-
max
Get the maximum of two dialect versions- Parameters:
a- the first version to compareb- the second version to compare- Returns:
- larger of the two versions
-
range
Creates a range of dialect versions between min and max.- Parameters:
min- may be null for open endmax- may be null for open end- Returns:
- range of versions
-