/** * Finds the resource with the given name and converts it to a simple string. * * @param name Name of the desired resource. * @return The resource converted to a string, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public String getString(String name) throws IOException { return getString(baseClass, name, null); }
/** * Finds the resource with the given name for the specified locale and returns it as an input stream. * * @param name Name of the desired resource. * @param locale The locale. Can be <jk>null</jk>. * @return An input stream to the object, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public InputStream getStream(String name, Locale locale) throws IOException { return getStream(baseClass, name, locale); }
.vars(ConfigVar.class) .vars(FileVar.class) .contextObject("crm", new ClasspathResourceManager(resourceClass));
.vars(ConfigVar.class) .vars(FileVar.class) .contextObject("crm", new ClasspathResourceManager(resourceClass));
/** * Finds the resource with the given name and converts it to a simple string. * * @param name Name of the desired resource. * @param locale The locale. Can be <jk>null</jk>. * @return The resource converted to a string, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public String getString(String name, Locale locale) throws IOException { return getString(baseClass, name, locale); }
/** * Finds the resource with the given name. * * @param name Name of the desired resource. * @return An input stream to the object, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public InputStream getStream(String name) throws IOException { return getStream(name, null); }
.vars(ConfigVar.class) .vars(FileVar.class) .contextObject("crm", new ClasspathResourceManager(resourceClass));
/** * Finds the resource with the given name and converts it to a simple string. * * @param name Name of the desired resource. * @param locale The locale. Can be <jk>null</jk>. * @return The resource converted to a string, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public String getString(String name, Locale locale) throws IOException { return getString(baseClass, name, locale); }
/** * Finds the resource with the given name. * * @param name Name of the desired resource. * @return An input stream to the object, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public InputStream getStream(String name) throws IOException { return getStream(name, null); }
/** * Finds the resource with the given name and converts it to a simple string. * * @param name Name of the desired resource. * @return The resource converted to a string, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public String getString(String name) throws IOException { return getString(baseClass, name, null); }
/** * Finds the resource with the given name. * * @param name Name of the desired resource. * @return An input stream to the object, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public InputStream getStream(String name) throws IOException { return getStream(name, null); }
/** * Finds the resource with the given name and converts it to a simple string. * * @param name Name of the desired resource. * @return The resource converted to a string, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public String getString(String name) throws IOException { return getString(baseClass, name, null); }
/** * Finds the resource with the given name for the specified locale and returns it as an input stream. * * @param name Name of the desired resource. * @param locale The locale. Can be <jk>null</jk>. * @return An input stream to the object, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public InputStream getStream(String name, Locale locale) throws IOException { return getStream(baseClass, name, locale); }
/** * Finds the resource with the given name and converts it to a simple string. * * @param name Name of the desired resource. * @param locale The locale. Can be <jk>null</jk>. * @return The resource converted to a string, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public String getString(String name, Locale locale) throws IOException { return getString(baseClass, name, locale); }
/** * Finds the resource with the given name for the specified locale and returns it as an input stream. * * @param name Name of the desired resource. * @param locale The locale. Can be <jk>null</jk>. * @return An input stream to the object, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public InputStream getStream(String name, Locale locale) throws IOException { return getStream(baseClass, name, locale); }
/** * Finds the resource with the given name and converts it to a simple string. * * @param baseClass * Overrides the default class to use for retrieving the classpath resource. * <br>If <jk>null<jk>, uses the base class passed in through the constructor of this class. * @param name Name of the desired resource. * @return The resource converted to a string, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public String getString(Class<?> baseClass, String name) throws IOException { return getString(baseClass, name, null); }
return staticResourceManager.getStream(baseClass, name, locale);
/** * Finds the resource with the given name and converts it to a simple string. * * @param baseClass * Overrides the default class to use for retrieving the classpath resource. * <br>If <jk>null<jk>, uses the base class passed in through the constructor of this class. * @param name Name of the desired resource. * @return The resource converted to a string, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public String getString(Class<?> baseClass, String name) throws IOException { return getString(baseClass, name, null); }
return staticResourceManager.getStream(baseClass, name, locale);
/** * Finds the resource with the given name and converts it to a simple string. * * @param baseClass * Overrides the default class to use for retrieving the classpath resource. * <br>If <jk>null<jk>, uses the base class passed in through the constructor of this class. * @param name Name of the desired resource. * @return The resource converted to a string, or <jk>null</jk> if the resource could not be found. * @throws IOException */ public String getString(Class<?> baseClass, String name) throws IOException { return getString(baseClass, name, null); }