Ejemplo n.º 1
0
 /**
  * Get a BundleResourceStream to named entry inside a bundle. Leading '/' is stripped.
  *
  * @param component Entry to get reference to.
  * @param ix index of sub archives. A postive number is the classpath entry index. 0 means look in
  *     the main bundle.
  * @return BundleResourceStream to entry or null if it doesn't exist.
  */
 public BundleResourceStream getBundleResourceStream(String component, int ix) {
   if (component.startsWith("/")) {
     component = component.substring(1);
   }
   if (ix == 0) {
     return archive.getBundleResourceStream(component);
   } else {
     return ((FileArchive) archives.get(ix - 1)).getBundleResourceStream(component);
   }
 }
Ejemplo n.º 2
0
 /** returns the localization entries of this archive. */
 public Hashtable getLocalizationEntries(String localeFile) {
   BundleResourceStream aif = archive.getBundleResourceStream(localeFile);
   if (aif != null) {
     Properties l = new Properties();
     try {
       l.load(aif);
     } catch (IOException _ignore) {
     }
     try {
       aif.close();
     } catch (IOException _ignore) {
     }
     return l;
   } else {
     return null;
   }
 }