Class Utils


  • public final class Utils
    extends java.lang.Object
    Miscellaneous static utility methods for use in JSR 105 RI.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static boolean getBoolean​(javax.xml.crypto.XMLCryptoContext xc, java.lang.String name)  
      static java.lang.String parseIdFromSameDocumentURI​(java.lang.String uri)
      Returns the ID from a same-document URI (ex: "#id")
      static byte[] readBytesFromStream​(java.io.InputStream is)  
      static boolean sameDocumentURI​(java.lang.String uri)
      Returns true if uri is a same-document URI, false otherwise.
      (package private) static boolean secureValidation​(javax.xml.crypto.XMLCryptoContext xc)  
      (package private) static java.util.Set<org.w3c.dom.Node> toNodeSet​(java.util.Iterator<org.w3c.dom.Node> i)
      Converts an Iterator to a Set of Nodes, according to the XPath Data Model.
      • Methods inherited from class java.lang.Object

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

      • Utils

        private Utils()
    • Method Detail

      • readBytesFromStream

        public static byte[] readBytesFromStream​(java.io.InputStream is)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • toNodeSet

        static java.util.Set<org.w3c.dom.Node> toNodeSet​(java.util.Iterator<org.w3c.dom.Node> i)
        Converts an Iterator to a Set of Nodes, according to the XPath Data Model.
        Parameters:
        i - the Iterator
        Returns:
        the Set of Nodes
      • parseIdFromSameDocumentURI

        public static java.lang.String parseIdFromSameDocumentURI​(java.lang.String uri)
        Returns the ID from a same-document URI (ex: "#id")
      • sameDocumentURI

        public static boolean sameDocumentURI​(java.lang.String uri)
        Returns true if uri is a same-document URI, false otherwise.
      • secureValidation

        static boolean secureValidation​(javax.xml.crypto.XMLCryptoContext xc)
      • getBoolean

        private static boolean getBoolean​(javax.xml.crypto.XMLCryptoContext xc,
                                          java.lang.String name)