|
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é
|
- Problem with SAXSVGDocumentFactory André Ávila
- Re: Problem with SAXSVGDocumentFactory André Ávila
