} catch (IOException e) {
log.error(e.getMessage(), e);
throw new ScriptException(e);
}
} else {
StreamHostObject sho = (StreamHostObject) args[0];
InputStream is = sho.getStream();
try {
byte[] buffer = new byte[1024];
int length;
while ((length = is.read(buffer)) != -1) {
who.inbound.getWsOutbound().writeBinaryMessage(ByteBuffer.wrap(buffer, 0, length));