code: protected <A> A getTypedParam(String paramName, String errorMessage, Class<A> clazz, Map<String, Object> mapToUse)
              throws IOException {
          Object o = mapToUse.get(paramName);
          if (o != null && clazz.isAssignableFrom(o.getClass())) {
              return (A) o;
          } else {
              if (errorMessage != null) {
                  throw new IOException(errorMessage);
              } else {
                  return null;
              }
          }
      }
docs: Convenience method for subclasses.
  
  @param paramName    the name of the parameter
  @param errorMessage the errormessage to add to the exception if the param does not exist.
  @param clazz        the class of the parameter that should be parsed.
  @param mapToUse     the map to use as inputparameter source
  @param <A>          the type of the parameter
  @return a stringparameter with given name. If it does not exist and the errormessage is provided,
  an IOException is thrown with that message. if the errormessage is not provided, null is returned.
  @throws IOException Exception if the paramname does not exist and an errormessage is provided.