synchronized (lock) { if (closed) throw new IOException ("Stream closed"); }
  public void flush () throws IOException  {    synchronized (lock)      {	if (closed)	  throw new IOException ("Stream closed");      }  }