java.lang.Object
org.apache.xmlgraphics.util.uri.DataURLUtil
Utility classes for generating RFC 2397 data URLs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateDataURL(InputStream in, String mediatype) Creates a new data URL and returns it as a String.static voidwriteDataURL(InputStream in, String mediatype, Writer writer) Generates a data URL and writes it to a Writer.
-
Method Details
-
createDataURL
Creates 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:
IOException- if an I/O error occurs
-
writeDataURL
Generates 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:
IOException- if an I/O error occurs
-