org.apache.fop.util

Class DataURLUtil


public class DataURLUtil
extends java.lang.Object

Utility classes for generating RFC 2397 data URLs.

Method Summary

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.

Method Details

createDataURL

public static String createDataURL(InputStream in,
                                   String mediatype)
            throws IOException
Creates a new data URL and returns it as a String.
Parameters:
in - the InputStream to read the data from
mediatype - the MIME type of the content, or null
Returns:
the newly created data URL

writeDataURL

public static void writeDataURL(InputStream in,
                                String mediatype,
                                Writer writer)
            throws IOException
Generates a data URL and writes it to a Writer.
Parameters:
in - the InputStream to read the data from
mediatype - the MIME type of the content, or null
writer - the Writer to write to

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.