fop 0.95

org.apache.fop.util
Class DataURLUtil

java.lang.Object
  extended by org.apache.fop.util.DataURLUtil

public class DataURLUtil
extends java.lang.Object

Utility classes for generating RFC 2397 data URLs.


Constructor Summary
DataURLUtil()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataURLUtil

public DataURLUtil()
Method Detail

createDataURL

public static java.lang.String createDataURL(java.io.InputStream in,
                                             java.lang.String mediatype)
                                      throws java.io.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
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.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
Throws:
java.io.IOException - if an I/O error occurs

fop 0.95

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