All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.factoryfx.dom.rest.ClasspathStaticFileAccess Maven / Gradle / Ivy

There is a newer version: 4.0.2
Show newest version
package io.github.factoryfx.dom.rest;


import java.io.IOException;
import java.io.InputStream;

public class ClasspathStaticFileAccess implements StaticFileAccess {
    public byte[] getFile(String path){
        try (InputStream inputStream= getClass().getResourceAsStream("/js/"+path)){
            return inputStream.readAllBytes();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy