Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.console')
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
index 8ee47071f..0cba219c1 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
@@ -199,6 +199,9 @@ public class IOConsoleOutputStream extends OutputStream {
*/
@Override
public synchronized void write(byte[] b, int off, int len) throws IOException {
+ if (closed) {
+ throw new IOException("Output Stream is closed"); //$NON-NLS-1$
+ }
StringBuilder builder = new StringBuilder();
this.decoder.decode(builder, b, off, len);
encodedWrite(builder.toString());
@@ -323,6 +326,9 @@ public class IOConsoleOutputStream extends OutputStream {
* @since 3.7
*/
public synchronized void setCharset(Charset charset) throws IOException {
+ if (closed) {
+ throw new IOException("Output Stream is closed"); //$NON-NLS-1$
+ }
StringBuilder builder = new StringBuilder();
this.decoder.finish(builder);
if (builder.length() > 0) {

Back to the top