List of usage examples for java.util.zip Deflater getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:Main.java
/** * Creates a SyncFlush Deflater for use on pre-KitKat Android * * @return The modified Deflater, or null if the creation failed *//*from ww w . jav a2 s . co m*/ @Nullable private static Deflater createSyncFlushDeflater() { Deflater def = new Deflater(); try { Field f = def.getClass().getDeclaredField("flushParm"); f.setAccessible(true); f.setInt(def, 2); // Z_SYNC_FLUSH } catch (Exception e) { return null; } return def; }