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 © 2017 Apache Software Foundation. All rights reserved.