fix export performance problems

This commit is contained in:
Vincent Breitmoser 2014-10-14 14:19:54 +02:00
parent 40850b933b
commit e58ba0f4bb

View File

@ -46,6 +46,7 @@ import org.sufficientlysecure.keychain.util.FileHelper;
import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.Log;
import org.sufficientlysecure.keychain.util.ProgressScaler; import org.sufficientlysecure.keychain.util.ProgressScaler;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
@ -289,6 +290,10 @@ public class ImportExportOperation extends BaseOperation {
} }
*/ */
if ( ! BufferedOutputStream.class.isInstance(outStream)) {
outStream = new BufferedOutputStream(outStream);
}
int okSecret = 0, okPublic = 0, progress = 0; int okSecret = 0, okPublic = 0, progress = 0;
try { try {