if (data != null)
if (hasXML11RestrictedChars) { int[] seq = UnicodeReader.toCodePointArray(data); for (int i = 0; i < seq.length; i++) { int c = seq[i]; if (XMLParser.isXML11RestrictedChar(c)) writer.write("&#x" + Integer.toHexString(c) + ";"); else writer.write(Character.toChars(i)); } } else
  public void writeComment(String data)    throws XMLStreamException  {    try      {        endStartElement();                if (data != null && data.indexOf("--") != -1)          throw new IllegalArgumentException(data);                writer.write("<!--");        if (data != null)          writer.write(data);        writer.write("-->");      }    catch (IOException e)      {        XMLStreamException e2 = new XMLStreamException(e);        e2.initCause(e);        throw e2;      }  }