Class DataUri


  • public abstract class DataUri
    extends java.lang.Object
    The DataUri class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String loadImage​(java.lang.String resource)
      Load an image resource from ClassLoader as DataURL.
      static java.lang.String loadImage​(java.net.URI uri)
      Load an image resource from ClassLoader as DataURL.
      static java.io.InputStream toInputStream​(java.io.File base, java.lang.String path)
      Converts the path to an URI.
      static java.net.URI toURI​(java.io.File base, java.lang.String path)
      Converts the path to an URI.
      • Methods inherited from class java.lang.Object

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

      • toInputStream

        public static java.io.InputStream toInputStream​(java.io.File base,
                                                        java.lang.String path)
                                                 throws java.io.IOException
        Converts the path to an URI.
        Parameters:
        base -
        path -
        Throws:
        java.io.IOException
      • toURI

        public static java.net.URI toURI​(java.io.File base,
                                         java.lang.String path)
        Converts the path to an URI.
        Parameters:
        base -
        path -
      • loadImage

        public static java.lang.String loadImage​(java.lang.String resource)
        Load an image resource from ClassLoader as DataURL.
        Parameters:
        resource -
      • loadImage

        public static java.lang.String loadImage​(java.net.URI uri)
        Load an image resource from ClassLoader as DataURL.
        Parameters:
        uri -