Class Util

java.lang.Object
org.zkoss.zats.mimic.impl.Util

public class Util extends Object
Utilities for implementation.
Author:
pao
  • Constructor Details

    • Util

      public Util()
  • Method Details

    • getZKVersion

      public static BigInteger getZKVersion()
    • isZKVersion

      public static boolean isZKVersion(int primaryVer)
    • hasClass

      public static boolean hasClass(String className)
    • checkVersion

      public static boolean checkVersion(String startVersion, String endVersion)
      check the given version range is match current ZK version or not. it accepts wildcard "*". e.g * or 5.0.* or 6.*.*
    • close

      public static void close(Closeable r)
      close resource without any exception.
      Parameters:
      r - resource. If null, do nothing.
    • parseVersion

      public static BigInteger parseVersion(String version)
      parse ZK version to uniform number for compare. the method design for normal version string, but it will still parse as long as possible.
      Parameters:
      version - ZK version string.
      Returns:
      uniform number or null if failed to parse.
    • generateRandomString

      public static String generateRandomString()