Package net.rootnode.loomchild.util.exceptions

Examples of net.rootnode.loomchild.util.exceptions.ResourceNotFoundException


   */
  public static InputStream getResourceStream(String name) {
    InputStream inputStream = Util.class.getClassLoader()
        .getResourceAsStream(name);
    if (inputStream == null) {
      throw new ResourceNotFoundException(name);
    }
    return inputStream;
  }
View Full Code Here


   *             Zgłaszany gdy nie udało się odnaleźć zasobu.
   */
  public static String getResourcePath(String name) {
    URL url = Util.class.getClassLoader().getResource(name);
    if (url == null) {
      throw new ResourceNotFoundException(name);
    }
    return url.getPath();
  }
View Full Code Here

                InputStream manifestStream = manifestUrl.openStream();
                Manifest manifest = new Manifest(manifestStream);
                return manifest;
            }
            catch (IOException e) {
              throw new ResourceNotFoundException(
                  "IO Error retrieving manifest.", e);
            }
        }
        else {
          throw new ResourceNotFoundException(
              "Class is not in a JAR archive " + klass.getName() + ".");
        }
    }
View Full Code Here

TOP

Related Classes of net.rootnode.loomchild.util.exceptions.ResourceNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.