public static <T> JBossEJBProperties fromResource(final String fileName, final ExceptionFunction<T, InputStream, IOException> streamSupplier, T param) throws IOException { return fromResource(fileName, ExceptionFunction::apply, streamSupplier, param); }
public static JBossEJBProperties fromResource(final String fileName, final ExceptionSupplier<InputStream, IOException> streamSupplier) throws IOException { return fromResource(fileName, ExceptionSupplier::get, streamSupplier); }
public static JBossEJBProperties fromClassPath(final ClassLoader classLoader, final String pathName) throws IOException { if (classLoader == null) { return fromResource(pathName, ClassLoader.getSystemResourceAsStream(pathName)); } return fromResource(pathName, ClassLoader::getResourceAsStream, classLoader, pathName); }
public static JBossEJBProperties fromPath(final Path propertiesFile) throws IOException { Assert.checkNotNullParam("propertiesFile", propertiesFile); return fromResource(propertiesFile.toString(), Files::newInputStream, propertiesFile); }
public static JBossEJBProperties fromFile(final File propertiesFile) throws IOException { Assert.checkNotNullParam("propertiesFile", propertiesFile); return fromResource(propertiesFile.getPath(), FileInputStream::new, propertiesFile); }
public static <T, U> JBossEJBProperties fromResource(final String fileName, final ExceptionBiFunction<T, U, InputStream, IOException> streamSupplier, T param1, U param2) throws IOException { Assert.checkNotNullParam("fileName", fileName); Assert.checkNotNullParam("streamSupplier", streamSupplier); final InputStream stream; try { stream = streamSupplier.apply(param1, param2); } catch (FileNotFoundException | NoSuchFileException e) { return null; } if (stream == null) { return null; } return fromResource(fileName, stream); }
public static JBossEJBProperties fromResource(final String fileName, final ExceptionSupplier<InputStream, IOException> streamSupplier) throws IOException { return fromResource(fileName, ExceptionSupplier::get, streamSupplier); }
public static <T> JBossEJBProperties fromResource(final String fileName, final ExceptionFunction<T, InputStream, IOException> streamSupplier, T param) throws IOException { return fromResource(fileName, ExceptionFunction::apply, streamSupplier, param); }
public static JBossEJBProperties fromResource(final String fileName, final ExceptionSupplier<InputStream, IOException> streamSupplier) throws IOException { return fromResource(fileName, ExceptionSupplier::get, streamSupplier); }
public static <T> JBossEJBProperties fromResource(final String fileName, final ExceptionFunction<T, InputStream, IOException> streamSupplier, T param) throws IOException { return fromResource(fileName, ExceptionFunction::apply, streamSupplier, param); }
public static JBossEJBProperties fromClassPath(final ClassLoader classLoader, final String pathName) throws IOException { if (classLoader == null) { return fromResource(pathName, ClassLoader.getSystemResourceAsStream(pathName)); } return fromResource(pathName, ClassLoader::getResourceAsStream, classLoader, pathName); }
public static JBossEJBProperties fromClassPath(final ClassLoader classLoader, final String pathName) throws IOException { if (classLoader == null) { return fromResource(pathName, ClassLoader.getSystemResourceAsStream(pathName)); } return fromResource(pathName, ClassLoader::getResourceAsStream, classLoader, pathName); }
public static JBossEJBProperties fromFile(final File propertiesFile) throws IOException { Assert.checkNotNullParam("propertiesFile", propertiesFile); return fromResource(propertiesFile.getPath(), FileInputStream::new, propertiesFile); }
public static JBossEJBProperties fromFile(final File propertiesFile) throws IOException { Assert.checkNotNullParam("propertiesFile", propertiesFile); return fromResource(propertiesFile.getPath(), FileInputStream::new, propertiesFile); }
public static JBossEJBProperties fromPath(final Path propertiesFile) throws IOException { Assert.checkNotNullParam("propertiesFile", propertiesFile); return fromResource(propertiesFile.toString(), Files::newInputStream, propertiesFile); }
public static JBossEJBProperties fromPath(final Path propertiesFile) throws IOException { Assert.checkNotNullParam("propertiesFile", propertiesFile); return fromResource(propertiesFile.toString(), Files::newInputStream, propertiesFile); }
public static <T, U> JBossEJBProperties fromResource(final String fileName, final ExceptionBiFunction<T, U, InputStream, IOException> streamSupplier, T param1, U param2) throws IOException { Assert.checkNotNullParam("fileName", fileName); Assert.checkNotNullParam("streamSupplier", streamSupplier); final InputStream stream; try { stream = streamSupplier.apply(param1, param2); } catch (FileNotFoundException | NoSuchFileException e) { return null; } if (stream == null) { return null; } return fromResource(fileName, stream); }
public static <T, U> JBossEJBProperties fromResource(final String fileName, final ExceptionBiFunction<T, U, InputStream, IOException> streamSupplier, T param1, U param2) throws IOException { Assert.checkNotNullParam("fileName", fileName); Assert.checkNotNullParam("streamSupplier", streamSupplier); final InputStream stream; try { stream = streamSupplier.apply(param1, param2); } catch (FileNotFoundException | NoSuchFileException e) { return null; } if (stream == null) { return null; } return fromResource(fileName, stream); }