Skip to content

Commit

Permalink
[java] batch copy input to multiple streams
Browse files Browse the repository at this point in the history
  • Loading branch information
joerg1985 committed Aug 30, 2023
1 parent 78981db commit 258a225
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions java/src/org/openqa/selenium/io/MultiOutputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 258a225

Please sign in to comment.