Resource (String name) { try { final ZipFile file = acquireZipFile(); if (file != null) { final ZipEntry entry = file.getEntry(name); if (entry != null) { return new Resource() { @Override public InputStream getInputStream() { try { final ZipFile file = acquireZipFile(); if (file != null) { final InputStream inputStream = file.getInputStream(entry); if (inputStream != null) { return new FilterInputStream(inputStream) {}; } } } catch (IOException e) { e.printStackTrace(); } return null; } public String toString() { return "JarLoader [" + myURL + "!/" + entry.getName() + "]"; } }; } } } catch (Exception e) { return null; } return null; }