Browse Source

update

research/10.0
Hades 5 years ago
parent
commit
c9958151e0
  1. 4
      designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java

4
designer-base/src/main/java/com/fr/design/update/ui/dialog/EncodingDetect.java

@ -1,5 +1,6 @@
package com.fr.design.update.ui.dialog; package com.fr.design.update.ui.dialog;
import com.fr.log.FineLoggerFactory;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -78,9 +79,8 @@ class BytesEncodingDetect extends Encoding {
byte[] rawtext = new byte[(int) testfile.length()]; byte[] rawtext = new byte[(int) testfile.length()];
try (FileInputStream chinesefile = new FileInputStream(testfile)) { try (FileInputStream chinesefile = new FileInputStream(testfile)) {
chinesefile.read(rawtext); chinesefile.read(rawtext);
chinesefile.close();
} catch (Exception e) { } catch (Exception e) {
System.err.println("Error: " + e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
return detectEncoding(rawtext); return detectEncoding(rawtext);
} }

Loading…
Cancel
Save