org.apache.fop.image.analyser
Class XMLReader
java.lang.Object
|
+--org.apache.fop.image.analyser.XMLReader
- All Implemented Interfaces:
- ImageReader
- public class XMLReader
- extends java.lang.Object
- implements ImageReader
ImageReader object for XML document image type.
Inner Class Summary |
static interface |
XMLReader.Converter
This interface is to be implemented for XML to image converters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLReader
public XMLReader()
setConverter
public static void setConverter(java.lang.String ns,
XMLReader.Converter conv)
- Registers a Converter implementation with XMLReader.
- Parameters:
ns
- The namespace to associate with this converterconv
- The actual Converter implementation
verifySignature
public FopImage.ImageInfo verifySignature(java.lang.String uri,
java.io.InputStream fis,
FOUserAgent ua)
throws java.io.IOException
- Description copied from interface:
ImageReader
- Verify image type. If the stream does not contain image data expected by
the reader it must reset the stream to the start. This is so that the
next reader can start reading from the start. The reader must not close
the stream unless it can handle the image and it has read the
information.
- Specified by:
verifySignature
in interface ImageReader
- See Also:
ImageReader
getMimeType
public java.lang.String getMimeType()
- Returns the MIME type supported by this implementation.
- Returns:
- The MIME type
loadImage
protected FopImage.ImageInfo loadImage(java.lang.String uri,
java.io.InputStream bis,
FOUserAgent ua)
- Creates an ImageInfo object from an XML image read from a stream.
(todo) This means the external svg document will be loaded twice. Possibly need
a slightly different design for the image stuff.
- Parameters:
uri
- The URI to the imagebis
- The InputStreamua
- The user agent- Returns:
- An ImageInfo object describing the image
createDocument
public FopImage.ImageInfo createDocument(java.io.InputStream is,
FOUserAgent ua)
- Creates an ImageInfo object from an XML image read from a stream.
- Parameters:
is
- The InputStreamua
- The user agent- Returns:
- An ImageInfo object describing the image
Copyright 1999-2006 The Apache Software Foundation. All Rights Reserved.