mirror of
https://github.com/revanced/multidexlib2.git
synced 2025-04-29 22:24:28 +02:00
Adapt to Guava changes
This commit is contained in:
parent
daf7741bbf
commit
aeb8f3ec6a
@ -24,8 +24,10 @@ public class ByteStreamsHack {
|
||||
// An equivalent -though inefficient- implementation using public-only API is:
|
||||
//return ByteStreams.toByteArray(inputStream);
|
||||
|
||||
if (expectedSize < 0) expectedSize = 0;
|
||||
return Files.readFile(inputStream, expectedSize);
|
||||
// Note that some special files may report size 0 but have content.
|
||||
return expectedSize <= 0 ?
|
||||
ByteStreams.toByteArray(inputStream) :
|
||||
ByteStreams.toByteArray(inputStream, expectedSize);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user