From 258a225dc3bfc54a6cef8971206b5302c006d310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sautter?= Date: Wed, 30 Aug 2023 16:54:52 +0200 Subject: [PATCH] [java] batch copy input to multiple streams --- java/src/org/openqa/selenium/io/MultiOutputStream.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/java/src/org/openqa/selenium/io/MultiOutputStream.java b/java/src/org/openqa/selenium/io/MultiOutputStream.java index 91e7e4415aed5..e600a627a7aa6 100644 --- a/java/src/org/openqa/selenium/io/MultiOutputStream.java +++ b/java/src/org/openqa/selenium/io/MultiOutputStream.java @@ -31,6 +31,14 @@ public MultiOutputStream(OutputStream mandatory, OutputStream optional) { this.optional = optional; } + @Override + public void write(byte[] b, int off, int len) throws IOException { + mandatory.write(b, off, len); + if (optional != null) { + optional.write(b, off, len); + } + } + @Override public void write(int b) throws IOException { mandatory.write(b);