int size = (int) zipentry.getSize();
ZipEntry entry = zipfile.getEntry(entryName); if (entry == null) { throw new IOException("Zip resource " + this + " does not exist"); } int size = (int) entry.getSize();
    public InputStream getInputStream() throws IOException {        ZipFile zipfile = null;        try {            zipfile = repository.getZipFile();            int size = (int) zipentry.getSize();            byte[] buf = new byte[size];            InputStream in = zipfile.getInputStream(zipentry);            int read = 0;            while (read < size) {                int r = in.read(buf, read, size-read);                if (r == -1)                    break;                read += r;            }            in.close();            return new ByteArrayInputStream(buf);        } finally {            zipfile.close();        }    }