Interface IBinaryStreamsProxy
-
- All Superinterfaces:
IStreamsProxy
,IStreamsProxy2
public interface IBinaryStreamsProxy extends IStreamsProxy2
A variant ofIStreamsProxy
which does not touch the proxied content and pass it as bytes instead of strings.A streams proxy acts as proxy between the streams of a process and interested clients. This abstraction allows implementations of
IProcess
to handle I/O related to the standard input, output, and error streams associated with a process.Clients implementing the
IProcess
interface for a process which produce or consumes binary content should consider to implement this interface instead of justIStreamsProxy
.- Since:
- 3.16
- See Also:
IProcess
,IStreamsProxy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IBinaryStreamMonitor
getBinaryErrorStreamMonitor()
Returns a monitor for the error stream of this proxy's process, ornull
if not supported.IBinaryStreamMonitor
getBinaryOutputStreamMonitor()
Returns a monitor for the output stream of this proxy's process, ornull
if not supported.default void
write(byte[] data)
Writes the given data to the output stream connected to the standard input stream of this proxy's process.void
write(byte[] data, int offset, int length)
Writes the given data to the output stream connected to the standard input stream of this proxy's process.-
Methods inherited from interface org.eclipse.debug.core.model.IStreamsProxy
getErrorStreamMonitor, getOutputStreamMonitor, write
-
Methods inherited from interface org.eclipse.debug.core.model.IStreamsProxy2
closeInputStream
-
-
-
-
Method Detail
-
getBinaryErrorStreamMonitor
IBinaryStreamMonitor getBinaryErrorStreamMonitor()
Returns a monitor for the error stream of this proxy's process, ornull
if not supported.The monitor is connected to the error stream of the associated process.
In contrast to
IStreamsProxy.getErrorStreamMonitor()
which will decode the stream content to strings, theIBinaryStreamMonitor
will provide the raw stream data.- Returns:
- an error stream monitor, or
null
if none
-
getBinaryOutputStreamMonitor
IBinaryStreamMonitor getBinaryOutputStreamMonitor()
Returns a monitor for the output stream of this proxy's process, ornull
if not supported.The monitor is connected to the output stream of the associated process.
In contrast to
IStreamsProxy.getOutputStreamMonitor()
which will decode the stream content to strings, theIBinaryStreamMonitor
will provide the raw stream data.- Returns:
- an output stream monitor, or
null
if none
-
write
default void write(byte[] data) throws IOException
Writes the given data to the output stream connected to the standard input stream of this proxy's process.- Parameters:
data
- the data to be written- Throws:
IOException
- when an error occurs writing to the underlyingOutputStream
.
-
write
void write(byte[] data, int offset, int length) throws IOException
Writes the given data to the output stream connected to the standard input stream of this proxy's process.- Parameters:
data
- the data to be writtenoffset
- start offset in the datalength
- number of bytes to write- Throws:
IOException
- when an error occurs writing to the underlyingOutputStream
.
-
-