diff --git a/src/main/java/org/cactoos/io/TeeInputStream.java b/src/main/java/org/cactoos/io/TeeInputStream.java index bd31b29de9..c882476354 100644 --- a/src/main/java/org/cactoos/io/TeeInputStream.java +++ b/src/main/java/org/cactoos/io/TeeInputStream.java @@ -59,7 +59,9 @@ public TeeInputStream(final InputStream src, final OutputStream tgt) { @Override public int read() throws IOException { final int data = this.input.read(); - this.output.write(data); + if (data >= 0) { + this.output.write(data); + } return data; }