Jeremias Maerki wrote:

You're welcome. The only way to verify is to decode the URL and save the
extracted data to a file which will then be a normal JPEG file (or
whatever).

To do this, just create a small program which builds a java.net.URL
instance from the data URL, then get the InputStream by calling
URL.openStream() and read and copy all the data to a FileOutputStream.


Another way would be to pass the result of URL.openStream() to ImageIO.read(InputStream). If it throws an error, you can assume the image isn't valid, and that it probably won't work in FOP either.

You could use this to discover whether an image will break before starting FOP, and without needing user intervention.

Daniel

--
Daniel Noll

NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax:   (02) 9283 9020

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to