Package com.googlecode.d2j.reader.zip
Class ZipUtil
- java.lang.Object
-
- com.googlecode.d2j.reader.zip.ZipUtil
-
public final class ZipUtil extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]readDex(byte[] data)read the dex file from byte array, if the byte array is a zip stream, it will return the content of classes.dex in the zip stream.static byte[]readDex(java.io.File file)read the dex file from file, if the file is a zip file, it will return the content of classes.dex in the zip file.static byte[]readDex(java.io.InputStream in)static byte[]readDex(java.nio.file.Path file)static byte[]toByteArray(java.io.InputStream is)
-
-
-
Method Detail
-
toByteArray
public static byte[] toByteArray(java.io.InputStream is) throws java.io.IOException- Throws:
java.io.IOException
-
readDex
public static byte[] readDex(java.io.File file) throws java.io.IOExceptionread the dex file from file, if the file is a zip file, it will return the content of classes.dex in the zip file.- Throws:
java.io.IOException
-
readDex
public static byte[] readDex(java.nio.file.Path file) throws java.io.IOException- Throws:
java.io.IOException
-
readDex
public static byte[] readDex(java.io.InputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
readDex
public static byte[] readDex(byte[] data) throws java.io.IOExceptionread the dex file from byte array, if the byte array is a zip stream, it will return the content of classes.dex in the zip stream.- Returns:
- the content of classes.dex
- Throws:
java.io.IOException
-
-