List of usage examples for org.apache.commons.compress.archivers.zip ZipFile getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:io.github.zlika.reproducible.ZipStripper.java
private InputStream getRawInputStream(ZipFile zip, ZipArchiveEntry ze) throws IOException { try {/*from w ww . ja va 2s. c o m*/ // Call ZipFile.getRawInputStream(ZipArchiveEntry) by reflection // because it is a private method but we need it! final Method method = zip.getClass().getDeclaredMethod("getRawInputStream", ZipArchiveEntry.class); method.setAccessible(true); return (InputStream) method.invoke(zip, ze); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { throw new IOException(e); } }