public void write(int b) throws IOException {
  output.write(b);
  bytesWritten++;
}

public void write ( int b ) throws IOException { output . write ( b ) ; bytesWritten ++ ; }
counts the written bytes .
