|
@@ -111,10 +111,10 @@ public class TextFile {
|
|
|
return content.substring(0, index);
|
|
return content.substring(0, index);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public String readFile(File file) {
|
|
|
|
|
|
|
+ public String readFile(File file, String charset) {
|
|
|
StringBuilder content = new StringBuilder();
|
|
StringBuilder content = new StringBuilder();
|
|
|
try {
|
|
try {
|
|
|
- BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file)), bufSize);
|
|
|
|
|
|
|
+ BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file), charset), bufSize);
|
|
|
String line;
|
|
String line;
|
|
|
while ((line = in.readLine()) != null) {
|
|
while ((line = in.readLine()) != null) {
|
|
|
content.append(line).append(System.lineSeparator());
|
|
content.append(line).append(System.lineSeparator());
|