Skip to content

Commit 5e8f38b

Browse files
committed
Remove unused unzip function
1 parent 16ccc20 commit 5e8f38b

File tree

1 file changed

+0
-33
lines changed
  • app/src/main/java/com/emanuelef/remote_capture

1 file changed

+0
-33
lines changed

app/src/main/java/com/emanuelef/remote_capture/Utils.java

-33
Original file line numberDiff line numberDiff line change
@@ -1002,39 +1002,6 @@ public static int getIntentFlags(int flags) {
10021002
return flags;
10031003
}
10041004

1005-
public static boolean unzip(InputStream is, String dstpath) {
1006-
try(ZipInputStream zipIn = new ZipInputStream(is)) {
1007-
ZipEntry entry = zipIn.getNextEntry();
1008-
1009-
while (entry != null) {
1010-
File dst = new File(dstpath + File.separator + entry.getName());
1011-
1012-
if (entry.isDirectory()) {
1013-
if(!dst.mkdirs()) {
1014-
Log.w("unzip", "Could not create directories");
1015-
return false;
1016-
}
1017-
} else {
1018-
// Extract file
1019-
try(BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(dst))) {
1020-
byte[] bytesIn = new byte[4096];
1021-
int read;
1022-
while ((read = zipIn.read(bytesIn)) != -1)
1023-
bos.write(bytesIn, 0, read);
1024-
}
1025-
}
1026-
1027-
zipIn.closeEntry();
1028-
entry = zipIn.getNextEntry();
1029-
}
1030-
1031-
return true;
1032-
} catch (IOException e) {
1033-
e.printStackTrace();
1034-
return false;
1035-
}
1036-
}
1037-
10381005
public static boolean ungzip(InputStream is, String dst) {
10391006
try(GZIPInputStream gis = new GZIPInputStream(is)) {
10401007
try(BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(dst))) {

0 commit comments

Comments
 (0)