docs: public static <T> Class<T> resolveClassByName(
  			DataInputView in,
  			ClassLoader cl,
  			Class<? super T> supertype) throws IOException {
  
  		final String className = in.readUTF();
  		final Class<?> rawClazz;
  		try {
  			rawClazz = Class.forName(className, false, cl);
  		}
  		catch (ClassNotFoundException e) {
  			throw new IOException(
  					"Could not find class '" + className +  "' in classpath.", e);
  		}
  
  		if (!supertype.isAssignableFrom(rawClazz)) {
  			throw new IOException("The class " + className + " is not a subclass of " + supertype.getName());
  		}
  
  		@SuppressWarnings("unchecked")
  		Class<T> clazz = (Class<T>) rawClazz;
  		return clazz;
  	}