reformatted

This commit is contained in:
Pratik Shelarkar 2023-12-03 01:50:13 +05:30
parent cefe159ce0
commit 37222e2785
1 changed files with 26 additions and 23 deletions

View File

@ -29,7 +29,8 @@ public final class TextAreaPrintStream extends PrintStream {
private final JTextArea textArea; private final JTextArea textArea;
public TextAreaPrintStream(JTextArea textArea) { public TextAreaPrintStream(JTextArea textArea) {
super(new OutputStream() { super(
new OutputStream() {
@Override @Override
public void write(int b) throws IOException { public void write(int b) throws IOException {
textArea.append(String.valueOf((char) b)); textArea.append(String.valueOf((char) b));
@ -40,7 +41,9 @@ public final class TextAreaPrintStream extends PrintStream {
String s = new String(b, off, len, StandardCharsets.UTF_8); String s = new String(b, off, len, StandardCharsets.UTF_8);
textArea.append(s); textArea.append(s);
} }
}, false, StandardCharsets.UTF_8); },
false,
StandardCharsets.UTF_8);
this.textArea = textArea; this.textArea = textArea;
} }