@Override
            public void write(OutputStream output) throws IOException {
                try {
                    tunnel.interceptStream(streamIndex, output);
                }
                catch (GuacamoleException e) {
                    throw new IOException(e);
                }
            }
Intercepts and returns the entire contents the stream represented by
this StreamResource.

@return
    A response through which the entire contents of the intercepted
    stream will be sent.
guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java