MemoryDataStore: Allow overriding of growth policy

This commit is contained in:
Lanchon 2017-09-24 19:38:19 -03:00 committed by Ben Gruver
parent ea7c265d12
commit 387299c6e3

View File

@ -7,7 +7,7 @@ import java.io.OutputStream;
import java.util.Arrays;
public class MemoryDataStore implements DexDataStore {
private byte[] buf;
protected byte[] buf;
public MemoryDataStore() {
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) {
return;
}