congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ObjectUtilities.getResource
Code IndexAdd Tabnine to your IDE (free)

How to use
getResource
method
in
org.jfree.util.ObjectUtilities

Best Java code snippets using org.jfree.util.ObjectUtilities.getResource (Showing top 9 results out of 315)

origin: org.jfree/com.springsource.org.jfree

/**
 * Returns the inputstream for the resource specified by the
 * <strong>absolute</strong> name.
 *
 * @param name the name of the resource
 * @param context the source class
 * @return the url of the resource or null, if not found.
 */
public static InputStream getResourceAsStream(final String name,
                       final Class context) {
  final URL url = getResource(name, context);
  if (url == null) {
    return null;
  }
  try {
    return url.openStream();
  }
  catch (IOException e) {
    return null;
  }
}
origin: jfree/jcommon

/**
 * Returns the inputstream for the resource specified by the
 * <strong>absolute</strong> name.
 *
 * @param name the name of the resource
 * @param context the source class
 * @return the url of the resource or null, if not found.
 */
public static InputStream getResourceAsStream(final String name,
                       final Class context) {
  final URL url = getResource(name, context);
  if (url == null) {
    return null;
  }
  try {
    return url.openStream();
  }
  catch (IOException e) {
    return null;
  }
}
origin: org.jfree/jcommon

/**
 * Returns the inputstream for the resource specified by the
 * <strong>absolute</strong> name.
 *
 * @param name the name of the resource
 * @param context the source class
 * @return the url of the resource or null, if not found.
 */
public static InputStream getResourceAsStream(final String name,
                       final Class context) {
  final URL url = getResource(name, context);
  if (url == null) {
    return null;
  }
  try {
    return url.openStream();
  }
  catch (IOException e) {
    return null;
  }
}
origin: jfree/jcommon

/**
 * Returns a URL pointing to a resource located in the classpath. The
 * resource is looked up using the given key.
 * <p/>
 * Example: The load a file named 'logo.gif' which is stored in a java
 * package named 'org.jfree.resources':
 * <pre>
 * mainmenu.logo=org/jfree/resources/logo.gif
 * </pre>
 * The URL for that file can be queried with: <code>getResource("mainmenu.logo");</code>.
 *
 * @param key the key for the resource
 * @return the resource URL
 */
public URL getResourceURL(final String key)
{
 final String name = getString(key);
 final URL in = ObjectUtilities.getResource(name, ResourceBundleSupport.class);
 if (in == null)
 {
  Log.warn("Unable to find file in the class path: " + name + "; key=" + key);
 }
 return in;
}
origin: org.jfree/jcommon

/**
 * Returns a URL pointing to a resource located in the classpath. The
 * resource is looked up using the given key.
 * <p>
 * Example: The load a file named 'logo.gif' which is stored in a java
 * package named 'org.jfree.resources':</p>
 * <pre>
 * mainmenu.logo=org/jfree/resources/logo.gif
 * </pre>
 * The URL for that file can be queried with: <code>getResource("mainmenu.logo");</code>.
 *
 * @param key the key for the resource
 * @return the resource URL
 */
public URL getResourceURL(final String key)
{
 final String name = getString(key);
 final URL in = ObjectUtilities.getResource(name, ResourceBundleSupport.class);
 if (in == null)
 {
  Log.warn("Unable to find file in the class path: " + name + "; key=" + key);
 }
 return in;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns a URL pointing to a resource located in the classpath. The
 * resource is looked up using the given key.
 * <p/>
 * Example: The load a file named 'logo.gif' which is stored in a java
 * package named 'org.jfree.resources':
 * <pre>
 * mainmenu.logo=org/jfree/resources/logo.gif
 * </pre>
 * The URL for that file can be queried with: <code>getResource("mainmenu.logo");</code>.
 *
 * @param key the key for the resource
 * @return the resource URL
 */
public URL getResourceURL(final String key)
{
 final String name = getString(key);
 final URL in = ObjectUtilities.getResource(name, ResourceBundleSupport.class);
 if (in == null)
 {
  Log.warn("Unable to find file in the class path: " + name + "; key=" + key);
 }
 return in;
}
origin: org.jfree/com.springsource.org.jfree

              final boolean large)
final URL in = ObjectUtilities.getResource(resourceName, ResourceBundleSupport.class);
origin: jfree/jcommon

              final boolean large)
final URL in = ObjectUtilities.getResource(resourceName, ResourceBundleSupport.class);
origin: org.jfree/jcommon

              final boolean large)
final URL in = ObjectUtilities.getResource(resourceName, ResourceBundleSupport.class);
org.jfree.utilObjectUtilitiesgetResource

Javadoc

Returns the resource specified by the absolute name.

Popular methods of ObjectUtilities

  • equal
    Returns true if the two objects are equal OR bothnull.
  • clone
    Returns a clone of the specified object, if it can be cloned, otherwise throws a CloneNotSupportedEx
  • convertName
    Transform the class-relative resource name into a global name by appending it to the classes package
  • getClassLoader
    Returns the classloader, which was responsible for loading the given class.
  • getClassLoaderSource
    Returns the internal configuration entry, whether the classloader of the thread context or the conte
  • getResourceRelative
    Returns the resource specified by the relative name.
  • getResourceRelativeAsStream
    Returns the inputstream for the resource specified by therelative name.
  • loadAndInstantiate
    Tries to create a new instance of the given class. This is a short cut for the common bean instantia
  • parseVersions
  • setClassLoaderSource
    Defines the internal configuration entry, whether the classloader of the thread context or the conte
  • deepClone
    Returns a new collection containing clones of all the items in the specified collection.
  • hashCode
    Returns a hash code for an object, or zero if the object isnull.
  • deepClone,
  • hashCode

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now