@Test public void start() { try { Version v1 = new Version(); final File temp = File.createTempFile("xw-junit", "itf"); final FileOutputStream fout = new FileOutputStream(temp); final DataOutputStream out = new DataOutputStream(fout); v1.setLoggerLevel(LoggerLevel.DEBUG); v1.setDUMPNULLS(true); final XMLWriter writer = new XMLWriter(out); writer.write(v1); System.out.println("v1 = " + v1.toXml()); Version v2 = new Version(); final XMLReader reader = new XMLReader(v2); reader.read(new FileInputStream(temp)); v2.setDUMPNULLS(true); assertTrue(v1.toXml().equals(v2.toXml())); } catch (final Exception e) { logger.exception(e); assert(false); } }
@Override public String toXml() { String ret = ("<" + getXMLTag() + " "); ret += " build=\"" + build + "\""; ret += " version=\"" + version + "\""; ret += " />"; return ret; }
Version extends XMLable { @Override public String toXml() { String ret = ("<" + getXMLTag() + " "); ret += " build=\"" + build + "\""; ret += " version=\"" + version + "\""; ret += " />"; return ret; } }
Version extends XMLable { @Override public String toXml() { String ret = ("<" + getXMLTag() + " "); ret += " build=\"" + build + "\""; ret += " version=\"" + version + "\""; ret += " />"; return ret; } Version();  Version(final String v);  Version(final String ver, final String bu);  Version(final DataInputStream input); }
Version extends XMLable { @Override public String toXml() { String ret = ("<" + getXMLTag() + " "); ret += " build=\"" + build + "\""; ret += " version=\"" + version + "\""; ret += " />"; return ret; } Version();  Version(final String v);  Version(final String ver, final String bu);  Version(final DataInputStream input); void fromString(final String str); void fromStrings(final String ver, final String bu); String full(); String rev(); String build(); @Override String toString(); @Override String toString(final boolean csv); @Override void xmlElementStart(final String uri, final String tag, final String qname, final Attributes attrs); @Override String toXml(); @Override void fromXml(final Attributes attrs); static void main(final String argv[]); }
Version extends XMLable { @Override public String toXml() { String ret = ("<" + getXMLTag() + " "); ret += " build=\"" + build + "\""; ret += " version=\"" + version + "\""; ret += " />"; return ret; } Version();  Version(final String v);  Version(final String ver, final String bu);  Version(final DataInputStream input); void fromString(final String str); void fromStrings(final String ver, final String bu); String full(); String rev(); String build(); @Override String toString(); @Override String toString(final boolean csv); @Override void xmlElementStart(final String uri, final String tag, final String qname, final Attributes attrs); @Override String toXml(); @Override void fromXml(final Attributes attrs); static void main(final String argv[]); static Version currentVersion; }