In the case that you're using FOP 0.92beta, you can implement a URIResolver which listens to the "inmemimage" protocol. You can then return a StreamSource instance that gives access to an ByteArrayInputStream on your byte array. Please see [1] for an example of such an URIResolver. Set it on the FopFactory as shown in [2] (init method). Very easy.
If you're using FOP 0.20.5, consider upgrading to FOP 0.92beta. :-) Or implement a protocol handler as described in [3]. [1] http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/src/java/org/apache/fop/servlet/ServletContextURIResolver.java [2] http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/src/java/org/apache/fop/servlet/FopServlet.java [3] http://java.sun.com/developer/onlineTraining/protocolhandlers/ On 16.05.2006 21:06:52 Bastian Hoesch wrote: > Hi there, > > i've a - probably - strange question. > I've a database on running on the server givin me an xsl/fo file with > references > to images. The images are stored in that database, too. So I have them already > in-memory (as byte arrays, stored in a map). I think its not very performant > to > store these images on disk only to read them via fop again. So, my first idea > was to have image reference urls in a specific form like > > inmemimage://unique-key > > to retrieve them directly from memory. Is there an easy way (i.e. without > modifying FOP source directly) to do this or something similiar? > > And sorry, I can't change the setting, images are stored in the db... > > thank you for your help, > Bastian Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
