public synchronized void write (byte[] b, int off, int len) throws IOException, NullPointerException, IndexOutOfBoundsException
public synchronized void write (int b) throws IOException
  public synchronized void write (byte[] b, int off, int len)    throws IOException, NullPointerException, IndexOutOfBoundsException  {    out.write(b, off, len);    written += len - off;  }