@Override
    public InputStream getInputStream() throws IOException {
        InputStream is;
        if (this.clazz != null) {
            is = this.clazz.getResourceAsStream(this.path);
        } else if (this.classLoader != null) {
            is = this.classLoader.getResourceAsStream(this.path);
        } else {
            is = ClassLoader.getSystemResourceAsStream(this.path);
        }
        if (is == null) {
            throw new FileNotFoundException(getDescription() + " cannot be opened because it does not exist");
        }
        return is;
    }
This implementation opens an InputStream for the given class path resource.

see java.lang.ClassLoader#getResourceAsStream(String)
see java.lang.Class#getResourceAsStream(String)
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/io/ClassPathResource.java