diff options
author | Ben Gruver <bgruv@google.com> | 2016-10-16 13:46:42 -0700 |
---|---|---|
committer | Ben Gruver <bgruv@google.com> | 2016-10-16 13:46:42 -0700 |
commit | 16d4b5656b0b803689191a299d25237acf735b5b (patch) | |
tree | c8bf1dabcec830adb0f180640a32dff4ea5d8ae9 | |
parent | a6593575e71a9cccf2d9711b774223aca12c22df (diff) | |
download | smali-16d4b5656b0b803689191a299d25237acf735b5b.tar.gz |
Use a BufferedInputStream in ZipDexContainer.isDex
-rw-r--r-- | dexlib2/src/main/java/org/jf/dexlib2/dexbacked/ZipDexContainer.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/ZipDexContainer.java b/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/ZipDexContainer.java index 1b2d85d2..50052c20 100644 --- a/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/ZipDexContainer.java +++ b/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/ZipDexContainer.java @@ -43,6 +43,7 @@ import org.jf.dexlib2.util.DexUtil.UnsupportedFile; import javax.annotation.Nonnull; import javax.annotation.Nullable; +import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -161,7 +162,7 @@ public class ZipDexContainer implements MultiDexContainer<ZipDexFile> { } protected boolean isDex(@Nonnull ZipFile zipFile, @Nonnull ZipEntry zipEntry) throws IOException { - InputStream inputStream = zipFile.getInputStream(zipEntry); + InputStream inputStream = new BufferedInputStream(zipFile.getInputStream(zipEntry)); try { DexUtil.verifyDexHeader(inputStream); } catch (NotADexFile ex) { |