public void close() {synchronized (lock) {if (out != null) {try {out.close();} catch (IOException e) {setError();}out = null;}}}
public override void close(){lock (@lock){if (@out != null){try{@out.close();}catch (System.IO.IOException){setError();}@out = null;}}}