code: @SuppressWarnings("unchecked")
      public static <T> T fromByteArrayKryo(byte[] data, Class<T> clazz, ClassLoader classLoader) {
          if (data == null) {
              return null;
          }
          Kryo kryo = kryoPool.obtain();
          try {
              ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
              if (classLoader != null) {
                  Thread.currentThread().setContextClassLoader(classLoader);
              }
              try {
                  Input input = kryoInputPool.obtain();
                  try {
                      kryo.setClassLoader(classLoader != null ? classLoader : oldClassLoader);
                      input.setInputStream(new ByteArrayInputStream(data));
                      Object obj = kryo.readClassAndObject(input);
                      input.close();
                      return obj != null && clazz.isAssignableFrom(obj.getClass()) ? (T) obj : null;
                  } finally {
                      kryoInputPool.free(input);
                  }
              } finally {
                  Thread.currentThread().setContextClassLoader(oldClassLoader);
              }
          } finally {
              kryoPool.free(kryo);
          }
      }
docs: Deserialize a byte array back to an object, with custom class loader.
  
  <p>
  This method uses Kryo lib.
  </p>
  
  @param data
  @param clazz
  @param classLoader
  @return