public static AbstractResource getRawResourceFrom(final String location) throws IOException {
        if (StringUtils.isBlank(location)) {
            throw new IllegalArgumentException("Provided location does not exist and is empty");
        }
        if (location.toLowerCase(Locale.ENGLISH).startsWith(HTTP_URL_PREFIX)) {
            return new UrlResource(location);
        }
        if (location.toLowerCase(Locale.ENGLISH).startsWith(CLASSPATH_URL_PREFIX)) {
            return new ClassPathResource(location.substring(CLASSPATH_URL_PREFIX.length()));
        }
        return new FileSystemResource(StringUtils.remove(location, FILE_URL_PREFIX));
    }
Gets resource from a String location.

@param location the metadata location
@return the resource from
@throws IOException the exception
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/ResourceUtils.java