Class DataURIScheme

java.lang.Object
net.sf.saxon.resource.DataURIScheme

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

    • DataURIScheme

      public DataURIScheme()
  • Method Details

    • decode

      public static Resource decode(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