Class DataURIScheme


  • public class DataURIScheme
    extends java.lang.Object
    This class handles URIs using the data: URI scheme defined in RFC 2397
    • Constructor Summary

      Constructors 
      Constructor Description
      DataURIScheme()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Resource decode​(java.net.URI uri)
      Parse the content of a URI that uses the data: URI scheme defined in RFC 2397, and return a Resource representing the content of the URI
      • Methods inherited from class java.lang.Object

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

      • DataURIScheme

        public DataURIScheme()
    • Method Detail

      • decode

        public static Resource decode​(java.net.URI uri)
                               throws XPathException
        Parse the content of a URI that uses the data: URI scheme defined in RFC 2397, and return a Resource representing the content of the URI
        Parameters:
        uri - a valid URI using the data: URI scheme
        Returns:
        either a BinaryResource (if the URI specifies "base64") or an UnparsedTextResource (otherwise) representing the data part of the URI (the part after the comma)
        Throws:
        XPathException - if the URI is invalid, or uses an unknown encoding, or cannot be decoded