----- Original Message -----
Sent: Thursday, March 09, 2006 7:20
PM
Subject: Problem with
SAXSVGDocumentFactory
Hello,
I'm using SAXSVGDocumentFactory to create
SVGDocument objects from ByteBuffer objects in memory. The code is very
simple:
ByteBuffer fileBuffer; // initialized somewhere
else
ByteArrayInputStream file = new
ByteArrayInputStream(fileBuffer.array());
String parser =
XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory
factory = new SAXSVGDocumentFactory(parser);
SVGDocument doc =
factory.createSVGDocument(null, file);
This code works fine most of the times, but for
some SVGs the SAXSVGDocumentFactory raises a "java.io.IOException:
Content is not allowed in trailing section", which would indicate that the
content is corrupted or somehow malformed. However, those same SVGs work fine when I load
them in Batik with the JSVGCanvas.setURI() method.
Why do I get
different results? Am I doing something wrong with SAXSVGDocumentFactory?
Thanks for any ideas!
André
No virus found in this incoming message.
Checked by AVG Free
Edition.
Version: 7.1.375 / Virus Database: 268.2.1/278 - Release Date:
9/3/2006