@ Nullable public static byte [ ] toByteArray ( @ Nonnull final ZipFile zipFile , @ Nonnull final String path ) throws IOException { final InputStream in = findInputStreamForResource ( zipFile , path ) ; byte [ ] result = null ; if ( in != null ) { try { result = IOUtils . toByteArray ( in ) ; } finally { IOUtils . closeQuietly ( in ) ; } } return result ; }
Read who ; e zip item into byte array .