Applied-Energistics-2-tiler.../recipes/loader/JarLoader.java

24 lines
459 B
Java
Raw Normal View History

package appeng.recipes.loader;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import appeng.api.recipes.IRecipeLoader;
public class JarLoader implements IRecipeLoader
{
private String rootPath;
public JarLoader(String s) {
rootPath = s;
}
@Override
public BufferedReader getFile(String s) throws Exception
{
return new BufferedReader( new InputStreamReader( getClass().getResourceAsStream( rootPath + s ), "UTF-8" ) );
}
}