public void readFrom(InputStream is) throws IOException { try { TableDocument doc = TableDocument.Factory.parse(is); ctTable = doc.getTable(); } catch (XmlException e) { throw new IOException(e.getLocalizedMessage()); } }
public void writeTo(OutputStream out) throws IOException { TableDocument doc = TableDocument.Factory.newInstance(); doc.setTable(ctTable); doc.save(out, DEFAULT_XML_OPTIONS); }