public void write( Object o ) throws IOException { mkdirs(); AtomicFileWriter w = new AtomicFileWriter(file); try { w.write("<?xml version='1.1' encoding='UTF-8'?>\n"); beingWritten.put(o, null); writing.set(file); try { xs.toXML(o, w); } finally { beingWritten.remove(o); writing.set(null); } w.commit(); } catch(RuntimeException e) { throw new IOException(e); } finally { w.abort(); } }
public void write( Object o ) throws IOException { mkdirs(); AtomicFileWriter w = new AtomicFileWriter(file); try { w.write("<?xml version='1.0' encoding='UTF-8'?>\n"); beingWritten.put(o, null); writing.set(file); try { xs.toXML(o, w); } finally { beingWritten.remove(o); writing.set(null); } w.commit(); } catch(StreamException e) { throw new IOException(e); } finally { w.abort(); } }
public void write( Object o ) throws IOException { mkdirs(); AtomicFileWriter w = new AtomicFileWriter(file); try { w.write("<?xml version='1.0' encoding='UTF-8'?>\n"); xs.toXML(o,w); w.commit(); } catch(StreamException e) { throw new IOException2(e); } finally { w.abort(); } }
public void write( Object o ) throws IOException { mkdirs(); AtomicFileWriter w = new AtomicFileWriter(file); try { w.write("<?xml version='1.0' encoding='UTF-8'?>\n"); xs.toXML(o,w); w.commit(); } catch(StreamException e) { throw new IOException2(e); } finally { w.abort(); } }
public void write(Object o) throws IOException { mkdirs(); AtomicFileWriter w = new AtomicFileWriter(file); try { w.write("<?xml version='1.0' encoding='UTF-8'?>\n"); xs.toXML(o, w); w.commit(); } catch (StreamException e) { throw new IOException2(e); } finally { w.abort(); } }
public void write( Object o ) throws IOException { mkdirs(); AtomicFileWriter w = new AtomicFileWriter(file); try { w.write("<?xml version='1.0' encoding='UTF-8'?>\n"); xs.toXML(o,w); w.commit(); } catch(StreamException e) { throw new IOException2(e); } finally { w.abort(); } }