Class ZstdRuntime


  • @Internal
    @Contract(threading=STATELESS)
    public final class ZstdRuntime
    extends java.lang.Object
    Utility to detect availability of the Zstandard JNI runtime on the classpath.

    Used by the async client implementation to conditionally register zstd encoders/decoders without creating a hard dependency on zstd-jni.

    This class performs a lightweight reflective check and intentionally avoids linking to JNI classes at compile time to prevent LinkageErrors when the optional dependency is absent.

    Since:
    5.6
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String ZSTD  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ZstdRuntime()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean available()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZstdRuntime

        private ZstdRuntime()
    • Method Detail

      • available

        public static boolean available()
        Returns:
        true if com.github.luben.zstd.Zstd can be loaded by the current class loader; false otherwise