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