Package jcifs
Enum DialectVersion
- java.lang.Object
-
- java.lang.Enum<DialectVersion>
-
- jcifs.DialectVersion
-
- All Implemented Interfaces:
Serializable
,Comparable<DialectVersion>
public enum DialectVersion extends Enum<DialectVersion>
- Author:
- mbechler
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
atLeast(DialectVersion v)
boolean
atMost(DialectVersion v)
int
getDialect()
boolean
isSMB2()
static DialectVersion
max(DialectVersion a, DialectVersion b)
static DialectVersion
min(DialectVersion a, DialectVersion b)
static Set<DialectVersion>
range(DialectVersion min, DialectVersion max)
static DialectVersion
valueOf(String name)
Returns the enum constant of this type with the specified name.static DialectVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SMB1
public static final DialectVersion SMB1
Legacy SMB1/CIFS
-
SMB202
public static final DialectVersion SMB202
SMB 2.02 - Windows Vista+
-
SMB210
public static final DialectVersion SMB210
SMB 2.1 - Windows 7/Server 2008R2
-
SMB300
public static final DialectVersion SMB300
SMB 3.0 - Windows 8/Server 2012
-
SMB302
public static final DialectVersion SMB302
SMB 3.0.2 - Windows 8.1/Server 2012R2
-
SMB311
public static final DialectVersion SMB311
SMB 3.1.1 - Windows 10/Server 2016
-
-
Method Detail
-
values
public static DialectVersion[] 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 (DialectVersion c : DialectVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DialectVersion 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
-
isSMB2
public final boolean isSMB2()
- Returns:
- the smb2
-
getDialect
public final int getDialect()
- Returns:
- the dialect
-
atLeast
public boolean atLeast(DialectVersion v)
- Parameters:
v
-- Returns:
- whether this version is a least the given one
-
atMost
public boolean atMost(DialectVersion v)
- Parameters:
v
-- Returns:
- whether this version is a most the given one
-
min
public static DialectVersion min(DialectVersion a, DialectVersion b)
- Parameters:
a
-b
-- Returns:
- smaller of the two versions
-
max
public static DialectVersion max(DialectVersion a, DialectVersion b)
- Parameters:
a
-b
-- Returns:
- larger of the two versions
-
range
public static Set<DialectVersion> range(DialectVersion min, DialectVersion max)
- Parameters:
min
- may be null for open endmax
- may be null for open end- Returns:
- range of versions
-
-