mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 21:50:46 +00:00
removed unnecessary string=>utf8 byte[]=>input stream=>reader converts, utf8 helper added (UnsupportedEndodingException should not thrown)
This commit is contained in:
@@ -30,6 +30,7 @@ import com.jpexs.helpers.Cache;
|
||||
import com.jpexs.helpers.Helper;
|
||||
import com.jpexs.helpers.ProgressListener;
|
||||
import com.jpexs.helpers.ReReadableInputStream;
|
||||
import com.jpexs.helpers.utf8.Utf8PrintWriter;
|
||||
import com.sun.jna.Platform;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
@@ -608,11 +609,7 @@ public class Main {
|
||||
} else {
|
||||
if (f.getName().endsWith(".java")) {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
PrintWriter pw = null;
|
||||
try {
|
||||
pw = new PrintWriter(new OutputStreamWriter(baos, "utf8"));
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
}
|
||||
PrintWriter pw = new Utf8PrintWriter(baos);
|
||||
try {
|
||||
try (BufferedReader br = new BufferedReader(new FileReader(f))) {
|
||||
String s;
|
||||
|
||||
Reference in New Issue
Block a user