mirror of
https://github.com/revanced/Apktool.git
synced 2025-06-12 21:27:36 +02:00
remove BrutIO copy method
`copy` method already in IOUtils
This commit is contained in:
@ -30,10 +30,8 @@ public class BrutIO {
|
||||
try {
|
||||
IOUtils.copy(in, out);
|
||||
} finally {
|
||||
try {
|
||||
in.close();
|
||||
out.close();
|
||||
} catch (IOException ex) {}
|
||||
IOUtils.closeQuietly(in);
|
||||
IOUtils.closeQuietly(out);
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,19 +60,14 @@ public class BrutIO {
|
||||
return modified;
|
||||
}
|
||||
|
||||
public static CRC32 calculateCrc(InputStream input, byte[] buffer) throws IOException {
|
||||
public static CRC32 calculateCrc(InputStream input) throws IOException {
|
||||
CRC32 crc = new CRC32();
|
||||
int bytesRead = 0;
|
||||
int bytesRead;
|
||||
byte[] buffer = new byte[8192];
|
||||
while((bytesRead = input.read(buffer)) != -1) {
|
||||
crc.update(buffer, 0, bytesRead);
|
||||
}
|
||||
return crc;
|
||||
}
|
||||
|
||||
public static void copy(InputStream input, OutputStream output, byte[] buffer) throws IOException {
|
||||
int bytesRead;
|
||||
while((bytesRead = input.read(buffer)) != -1) {
|
||||
output.write(buffer, 0, bytesRead);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user