public byte[] read(String pResourceName) { InputStream in = null; try { ZipFile jarFile = new ZipFile(file); ZipEntry entry = jarFile.getEntry(pResourceName); //read into byte array ByteArrayOutputStream out = new ByteArrayOutputStream(); in = jarFile.getInputStream(entry); copy(in, out); return out.toByteArray(); } catch (Exception e) { if (LOG.isDebugEnabled()) LOG.debug("Unable to read file [#0] from [#1]", e, pResourceName, file.getName()); return null; } finally { closeQuietly(in); } }
classLoader.addResourceStore(new JarResourceStore(file));