mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
larger buffer size for iterateData, avoif native available calls
This commit is contained in:
@@ -72,6 +72,10 @@ public class LimitedInputStream extends FilterInputStream {
|
||||
return Math.min(super.available(), myReadLimit - myBytesRead);
|
||||
}
|
||||
|
||||
protected int remainingLimit() {
|
||||
return myReadLimit - myBytesRead;
|
||||
}
|
||||
|
||||
public synchronized void mark(final int readLimit) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@@ -509,7 +509,12 @@ abstract class PersistentEnumeratorBase<Data> implements Forceable, Closeable {
|
||||
myKeyStorage.force();
|
||||
|
||||
DataInputStream keysStream = new DataInputStream(new BufferedInputStream(new LimitedInputStream(new FileInputStream(keystreamFile()),
|
||||
myKeyStoreFileLength)));
|
||||
myKeyStoreFileLength) {
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
return remainingLimit();
|
||||
}
|
||||
}, 32768));
|
||||
try {
|
||||
try {
|
||||
while (true) {
|
||||
|
||||
Reference in New Issue
Block a user