code: @Override
      public void writeNamespace(String prefix, String nsURI) throws XMLStreamException
      {
          if (prefix == null || prefix.length() == 0) {
              writeDefaultNamespace(nsURI);
              return;
          }
          if (!mNsAware) {
              throwOutputError("Can not write namespaces with non-namespace writer.");
          }
          outputAttribute(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns", prefix, nsURI);
          mCurrElem.addPrefix(prefix, nsURI);
      }
docs: public void writeEntityRef(String name)