public final class DataURLUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
createDataURL(InputStream in,
String mediatype)
Creates a new data URL and returns it as a String.
|
static void |
writeDataURL(InputStream in,
String mediatype,
Writer writer)
Generates a data URL and writes it to a Writer.
|
public static String createDataURL(InputStream in, String mediatype) throws IOException
in - the InputStream to read the data frommediatype - the MIME type of the content, or nullIOException - if an I/O error occurspublic static void writeDataURL(InputStream in, String mediatype, Writer writer) throws IOException
in - the InputStream to read the data frommediatype - the MIME type of the content, or nullwriter - the Writer to write toIOException - if an I/O error occursCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.