public byte[] getBytes() { assert(tags.size() == 0); return this.toString().getBytes(UTF8); }
/** * Gets the byte. * @return the byte[] of the XML. */ public byte[] getBytes() { assert (tags.size() == 0); return this.toString().getBytes(UTF8); }
@Test public void testEscapedCharacters() { XmlWriter w = new XmlWriter(); String[] attrs = { "tab", "newLine", "return", "ampersand", "quote", "lessthan", "greaterthan" }; String[] values = { "\t", "\n", "\r", "&", "\"", "<", ">" }; w.start("test", attrs, values); w.end(); String expected = "<test tab=\"	\" newLine=\" \" return=\" \" ampersand=\"&\" quote=\""\" lessthan=\"<\" greaterthan=\">\"></test>"; assertEquals(expected, w.toString()); }
/** * Gets the byte. * @return the byte[] of the XML. */ public byte[] getBytes() { assert (tags.size() == 0); return this.toString().getBytes(UTF8); }
public byte[] getBytes() { assert(tags.size() == 0); return this.toString().getBytes(UTF8); }