Package it.smartio.docs.util
Class DataUri
- java.lang.Object
-
- it.smartio.docs.util.DataUri
-
public abstract class DataUri extends java.lang.ObjectTheDataUriclass.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringloadImage(java.lang.String resource)Load an image resource fromClassLoaderas DataURL.static java.lang.StringloadImage(java.net.URI uri)Load an image resource fromClassLoaderas DataURL.static java.io.InputStreamtoInputStream(java.io.File base, java.lang.String path)Converts the path to an URI.static java.net.URItoURI(java.io.File base, java.lang.String path)Converts the path to an URI.
-
-
-
Method Detail
-
toInputStream
public static java.io.InputStream toInputStream(java.io.File base, java.lang.String path) throws java.io.IOExceptionConverts 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 fromClassLoaderas DataURL.- Parameters:
resource-
-
loadImage
public static java.lang.String loadImage(java.net.URI uri)
Load an image resource fromClassLoaderas DataURL.- Parameters:
uri-
-
-