piccolo failed on gzip files
Brought to you by:
yuvalo
I used piccolo with this piece of code:
is= new FileInputStream(d);
if (d.getName().endsWith(".gz"))
{
is= new GZIPInputStream(is);
}
saxparser.parse(is, myhandler);
when files are not gzipped, it works very well (and fast).
when gziped, it always failed with a
1:-1 XML declaration is not well-formed
org.xml.sax.SAXParseException: XML declaration is not well-formed
at com.bluecast.xml.Piccolo.reportFatalError(Piccolo.java:1038)
at com.bluecast.xml.Piccolo.parse(Piccolo.java:723)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at ...
using apache.xerces it work well on the same gziped files.
sample gziped file