Skip to content

Commit 258a225

Browse files
committed
[java] batch copy input to multiple streams
1 parent 78981db commit 258a225

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

java/src/org/openqa/selenium/io/MultiOutputStream.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ public MultiOutputStream(OutputStream mandatory, OutputStream optional) {
3131
this.optional = optional;
3232
}
3333

34+
@Override
35+
public void write(byte[] b, int off, int len) throws IOException {
36+
mandatory.write(b, off, len);
37+
if (optional != null) {
38+
optional.write(b, off, len);
39+
}
40+
}
41+
3442
@Override
3543
public void write(int b) throws IOException {
3644
mandatory.write(b);

0 commit comments

Comments
 (0)