@Override
  public void write(int singleByte) throws IOException {
    underlyingOutputStream.write(singleByte);
    countAndCallListener(1);
  }
Wraps the {@code underlyingOutputStream} to count the bytes written.

@param underlyingOutputStream the wrapped {@link OutputStream}
@param byteCountListener the byte count {@link Consumer}
jib-core/src/main/java/com/google/cloud/tools/jib/http/NotifyingOutputStream.java