Search in sources :

Example 1 with SAXParserImpl

use of jdk.internal.util.xml.impl.SAXParserImpl in project jdk8u_jdk by JetBrains.

the class PropertiesDefaultHandler method load.

public void load(Properties props, InputStream in) throws IOException, InvalidPropertiesFormatException, UnsupportedEncodingException {
    this.properties = props;
    try {
        SAXParser parser = new SAXParserImpl();
        parser.parse(in, this);
    } catch (SAXException saxe) {
        throw new InvalidPropertiesFormatException(saxe);
    }
/**
         * String xmlVersion = propertiesElement.getAttribute("version"); if
         * (xmlVersion.compareTo(EXTERNAL_XML_VERSION) > 0) throw new
         * InvalidPropertiesFormatException( "Exported Properties file format
         * version " + xmlVersion + " is not supported. This java installation
         * can read" + " versions " + EXTERNAL_XML_VERSION + " or older. You" +
         * " may need to install a newer version of JDK.");
         */
}
Also used : SAXParserImpl(jdk.internal.util.xml.impl.SAXParserImpl) InvalidPropertiesFormatException(java.util.InvalidPropertiesFormatException) SAXException(jdk.internal.org.xml.sax.SAXException)

Aggregations

InvalidPropertiesFormatException (java.util.InvalidPropertiesFormatException)1 SAXException (jdk.internal.org.xml.sax.SAXException)1 SAXParserImpl (jdk.internal.util.xml.impl.SAXParserImpl)1