Package org.apache.xmlgraphics.util.uri
Class DataURLUtil
- java.lang.Object
-
- org.apache.xmlgraphics.util.uri.DataURLUtil
-
public final class DataURLUtil extends java.lang.ObjectUtility classes for generating RFC 2397 data URLs.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringcreateDataURL(java.io.InputStream in, java.lang.String mediatype)Creates a new data URL and returns it as a String.static voidwriteDataURL(java.io.InputStream in, java.lang.String mediatype, java.io.Writer writer)Generates a data URL and writes it to a Writer.
-
-
-
Method Detail
-
createDataURL
public static java.lang.String createDataURL(java.io.InputStream in, java.lang.String mediatype) throws java.io.IOExceptionCreates a new data URL and returns it as a String.- Parameters:
in- the InputStream to read the data frommediatype- the MIME type of the content, or null- Returns:
- the newly created data URL
- Throws:
java.io.IOException- if an I/O error occurs
-
writeDataURL
public static void writeDataURL(java.io.InputStream in, java.lang.String mediatype, java.io.Writer writer) throws java.io.IOExceptionGenerates a data URL and writes it to a Writer.- Parameters:
in- the InputStream to read the data frommediatype- the MIME type of the content, or nullwriter- the Writer to write to- Throws:
java.io.IOException- if an I/O error occurs
-
-