mirror of
https://github.com/revanced/smali.git
synced 2025-05-30 20:40:11 +02:00
MemoryDataStore: Allow overriding of growth policy
This commit is contained in:
parent
ea7c265d12
commit
387299c6e3
@ -7,7 +7,7 @@ import java.io.OutputStream;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class MemoryDataStore implements DexDataStore {
|
public class MemoryDataStore implements DexDataStore {
|
||||||
private byte[] buf;
|
protected byte[] buf;
|
||||||
|
|
||||||
public MemoryDataStore() {
|
public MemoryDataStore() {
|
||||||
this(1024 * 1024);
|
this(1024 * 1024);
|
||||||
@ -43,7 +43,7 @@ public class MemoryDataStore implements DexDataStore {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void growBufferIfNeeded(int minSize) {
|
protected void growBufferIfNeeded(int minSize) {
|
||||||
if (minSize <= buf.length) {
|
if (minSize <= buf.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user