Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2020-06-27 12:40:59 +0000
committerPaul Pazderski2020-06-27 13:05:58 +0000
commit00d93c9a6e6af649b84604baa0c0866c4d3511e5 (patch)
tree4c11859cd9c16752e8fbf394bca15efea60485f4 /org.eclipse.debug.core/core/org/eclipse/debug/core/IBinaryStreamListener.java
parent154562ad4914da3e6b95fd3381b5e55eb8b2326d (diff)
downloadeclipse.platform.debug-00d93c9a6e6af649b84604baa0c0866c4d3511e5.tar.gz
eclipse.platform.debug-00d93c9a6e6af649b84604baa0c0866c4d3511e5.tar.xz
eclipse.platform.debug-00d93c9a6e6af649b84604baa0c0866c4d3511e5.zip
Bug 558463 - [console] Console redirection changes contentY20200629-1000Y20200629-0740I20200629-1800I20200628-1800
Unfortunately all the existing streams monitoring/proxying/redirection or basically most of the console IO stack is based upon strings. If a program produce 'random' binary output and user configures console to redirect the output to a file it might still be changed due to the (until now) unavoidable string decoding. Keeping existing API and not breaking clients made this change in some parts more complex than it could be. Change-Id: Id8e8fa1f777f06220af86dd4f026873c6b0b2d7b Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
Diffstat (limited to 'org.eclipse.debug.core/core/org/eclipse/debug/core/IBinaryStreamListener.java')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/IBinaryStreamListener.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/IBinaryStreamListener.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/IBinaryStreamListener.java
new file mode 100644
index 000000000..b21697abe
--- /dev/null
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/IBinaryStreamListener.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Paul Pazderski and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Paul Pazderski - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.core;
+
+import org.eclipse.debug.core.model.IBinaryStreamMonitor;
+
+/**
+ * A stream listener is notified of changes to a binary stream monitor.
+ * <p>
+ * Clients may implement this interface.
+ * </p>
+ *
+ * @see IBinaryStreamMonitor
+ * @see IStreamListener
+ * @since 3.16
+ */
+public interface IBinaryStreamListener {
+
+ /**
+ * Notifies this listener that data has been appended to the given stream
+ * monitor.
+ *
+ * @param data the content appended; not <code>null</code>
+ * @param monitor the stream monitor to which content was appended
+ */
+ void streamAppended(byte[] data, IBinaryStreamMonitor monitor);
+}

Back to the top