Code example for ZipEntry

Methods: getSize

0
			BufferedInputStream bis = null;
			byte[] res = null;
			try { 
				zipFile = new ZipFile(jar);
				ZipEntry zipEntry = zipFile.getEntry(className.replace('.', '/')+".class");
				res = new byte[(int)zipEntry.getSize()];
				bis = new BufferedInputStream(zipFile.getInputStream(zipEntry));
				bis.read(res, 0, res.length);
			} catch (Exception ex) {
				System.out.println("className: " + className + " Exception: "+ ex);
			} finally { 
				if (bis!=null) {
					try { 
						bis.close();
					} catch (IOException ioex) {}
				} 
				if (zipFile!=null) {
					try { 
						zipFile.close();
					} catch (IOException ioex) {}
				}