Commit 4521ad33 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Use StandardCharsets.US_ASCII instead of "US-ASCII".

parent afe4045b
......@@ -20,6 +20,7 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
......@@ -482,7 +483,7 @@ public class DocumentStore {
/* Document file is empty. */
return null;
}
documentString = new String(allData, "US-ASCII");
documentString = new String(allData, StandardCharsets.US_ASCII);
this.retrievedFiles++;
this.retrievedBytes += documentString.length();
} catch (IOException e) {
......@@ -765,7 +766,7 @@ public class DocumentStore {
throws IOException {
try (BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(file))) {
bos.write(content.getBytes("US-ASCII"));
bos.write(content.getBytes(StandardCharsets.US_ASCII));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment