public synchronized void write (byte[] buf, int offset, int len) throws IOException
public synchronized void write (int value) throws IOException
  public synchronized void write (byte[] buf, int offset, int len)      throws IOException  {    out.write(buf, offset, len);    written += len;  }