1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Buffer classifier data

This commit is contained in:
M66B 2021-02-10 12:46:29 +01:00
parent 3806000149
commit 2b16b6d19f

View file

@ -31,6 +31,8 @@ import androidx.preference.PreferenceManager;
import org.jetbrains.annotations.NotNull;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
@ -386,7 +388,7 @@ public class MessageClassifier {
long start = new Date().getTime();
File file = getFile(context);
try (JsonWriter writer = new JsonWriter(new FileWriter(file))) {
try (JsonWriter writer = new JsonWriter(new BufferedWriter(new FileWriter(file)))) {
writer.beginObject();
writer.name("version").value(2);
@ -467,7 +469,7 @@ public class MessageClassifier {
long start = new Date().getTime();
File file = getFile(context);
if (file.exists())
try (JsonReader reader = new JsonReader(new FileReader(file))) {
try (JsonReader reader = new JsonReader(new BufferedReader(new FileReader(file)))) {
reader.beginObject();
while (reader.hasNext())
switch (reader.nextName()) {