Class UriCanonicalizer


  • public final class UriCanonicalizer
    extends java.lang.Object
    This class is used for canonicalization of namespace URIs. It will act as a layer above String.intern(), trying to reduce calls to somewhat slow intern() method, and to do that as efficiently as possible considering that Strings in question are often longer than names in xml documents.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  UriCanonicalizer.BoundedHashMap
      We'll use a bounded map, which should work well for most normal cases, but avoid excesses for degenerate cases (unique URIs used as idenfitiers etc).
      (package private) static class  UriCanonicalizer.CanonicalKey  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String canonicalizeURI​(char[] ch, int len)  
      private void init()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UriCanonicalizer

        public UriCanonicalizer()
    • Method Detail

      • init

        private void init()
      • canonicalizeURI

        public java.lang.String canonicalizeURI​(char[] ch,
                                                int len)