Module jcifs

Enum Class DialectVersion

java.lang.Object
java.lang.Enum<DialectVersion>
org.codelibs.jcifs.smb.DialectVersion
All Implemented Interfaces:
Serializable, Comparable<DialectVersion>, Constable

public enum DialectVersion extends Enum<DialectVersion>
Enumeration of SMB protocol dialect versions supported by JCIFS. This includes legacy SMB1/CIFS as well as modern SMB2/SMB3 dialects.
Author:
mbechler
  • Enum Constant Details

    • 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 Details

    • values

      public static DialectVersion[] 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

      public static DialectVersion valueOf(String name)
      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 name
      NullPointerException - 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

      public boolean atLeast(DialectVersion v)
      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

      public boolean atMost(DialectVersion v)
      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

      public static DialectVersion min(DialectVersion a, DialectVersion b)
      Get the minimum of two dialect versions
      Parameters:
      a - the first version to compare
      b - the second version to compare
      Returns:
      smaller of the two versions
    • max

      public static DialectVersion max(DialectVersion a, DialectVersion b)
      Get the maximum of two dialect versions
      Parameters:
      a - the first version to compare
      b - the second version to compare
      Returns:
      larger of the two versions
    • range

      public static Set<DialectVersion> range(DialectVersion min, DialectVersion max)
      Creates a range of dialect versions between min and max.
      Parameters:
      min - may be null for open end
      max - may be null for open end
      Returns:
      range of versions