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:
parent
3806000149
commit
2b16b6d19f
1 changed files with 4 additions and 2 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue