Exemplo n.º 1
0
 /** Get a list of the available readings sets */
 public String[] getInstalledReadingsSets() {
   try {
     URL index = ResourceUtil.getResource(ReadingsBookDriver.class, "readings.txt");
     return NetUtil.listByIndexFile(NetUtil.toURI(index), new ReadingsFilter());
   } catch (IOException ex) {
     return new String[0];
   }
 }
Exemplo n.º 2
0
 /**
  * Generic resource URL fetcher
  *
  * @return The requested resource
  * @throws IOException if there is a problem reading the file
  * @throws MissingResourceException if the resource can not be found
  */
 public static InputStream getResourceAsStream(Class clazz, String search)
     throws IOException, MissingResourceException {
   return ResourceUtil.getResource(clazz, search).openStream();
 }