Class XmlDataSniffer
- java.lang.Object
-
- net.sf.jasperreports.renderers.util.XmlDataSniffer
-
public class XmlDataSniffer extends Object
Utility class that checks if provided byte data is a valid XML document. It does this by attempting to parse the data using a SAX parser.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XmlDataSniffer.XmlSniffResult
-
Constructor Summary
Constructors Constructor Description XmlDataSniffer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isXmlData(byte[] data)
protected static void
setParserFeature(SAXParserFactory factory, String feature, boolean value)
static XmlDataSniffer.XmlSniffResult
sniffXml(byte[] data)
-
-
-
Method Detail
-
isXmlData
public static boolean isXmlData(byte[] data)
-
sniffXml
public static XmlDataSniffer.XmlSniffResult sniffXml(byte[] data)
-
setParserFeature
protected static void setParserFeature(SAXParserFactory factory, String feature, boolean value)
-
-