code: @Override
      public Iterator<Namespace> getNamespaces()
      {
          if (mNsList == null) {
              int firstLocal = mFirstLocalNs;
              int len = mNsLength - firstLocal;
              if (len == 0) { // can this happen?
                  return DataUtil.emptyIterator();
              }
              if (len == 2) { // only one NS
                  return DataUtil.<Namespace>singletonIterator(NamespaceEventImpl.constructNamespace
                          (mLocation,
                                  mNamespaces[firstLocal],
                                  mNamespaces[firstLocal+1]));
              }
              ArrayList<Namespace> l = new ArrayList<Namespace>(len >> 1);
              String[] ns = mNamespaces;
              for (len = mNsLength; firstLocal < len;
                   firstLocal += 2) {
                  l.add(NamespaceEventImpl.constructNamespace(mLocation, ns[firstLocal],
                                                ns[firstLocal+1]));
              }
              mNsList = l;
          }
          return mNsList.iterator();
      }
docs: /*
  /////////////////////////////////////////////////////
  Extended API, needed by Wstx classes
  /////////////////////////////////////////////////////