/** * Returns the stream of a resource at a given path, using the CL of a class. * * @param path the path to search * @param clazz a {@link java.lang.Class} instance which class loader should be used when doing the lookup. * @param useTLCL {@code true} if the thread local class loader should be used as well, in addition to {@code classLoader} * @return a {@link java.io.InputStream} if the resource was found, or {@code null} otherwise * @see org.modeshape.common.util.ResourceLookup#read(String, ClassLoader, boolean) */ public static InputStream read( String path, Class<?> clazz, boolean useTLCL ) { return read(path, clazz.getClassLoader(), useTLCL); } }
/** * Returns the stream of a resource at a given path, using the CL of a class. * * @param path the path to search * @param clazz a {@link java.lang.Class} instance which class loader should be used when doing the lookup. * @param useTLCL {@code true} if the thread local class loader should be used as well, in addition to {@code classLoader} * @return a {@link java.io.InputStream} if the resource was found, or {@code null} otherwise * @see org.modeshape.common.util.ResourceLookup#read(String, ClassLoader, boolean) */ public static InputStream read( String path, Class<?> clazz, boolean useTLCL ) { return read(path, clazz.getClassLoader(), useTLCL); } }
/** * Returns the stream of a resource at a given path, using the CL of a class. * * @param path the path to search * @param clazz a {@link java.lang.Class} instance which class loader should be used when doing the lookup. * @param useTLCL {@code true} if the thread local class loader should be used as well, in addition to {@code classLoader} * @return a {@link java.io.InputStream} if the resource was found, or {@code null} otherwise * @see org.modeshape.common.util.ResourceLookup#read(String, ClassLoader, boolean) */ public static InputStream read( String path, Class<?> clazz, boolean useTLCL ) { return read(path, clazz.getClassLoader(), useTLCL); } }
public void importBuiltIns( Problems problems ) throws IOException { for (String resource : BUILT_INS) { InputStream stream = ResourceLookup.read(resource, getClass(), true); importFrom(stream, problems, resource); } }
public void importBuiltIns( Problems problems ) throws IOException { for (String resource : BUILT_INS) { InputStream stream = ResourceLookup.read(resource, getClass(), true); importFrom(stream, problems, resource); } }
throws ParsingException, FileNotFoundException { CheckArg.isNotNull(resourcePathOrJsonContentString, "resourcePathOrJsonContentString"); InputStream stream = ResourceLookup.read(resourcePathOrJsonContentString, RepositoryConfiguration.class, true);
throws ParsingException, FileNotFoundException { CheckArg.isNotNull(resourcePathOrJsonContentString, "resourcePathOrJsonContentString"); InputStream stream = ResourceLookup.read(resourcePathOrJsonContentString, RepositoryConfiguration.class, true);