jdk.internal.util.xml.impl.SAXParserImpl Java Examples
The following examples show how to use
jdk.internal.util.xml.impl.SAXParserImpl.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PropertiesDefaultHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #2
Source File: PropertiesDefaultHandler.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #3
Source File: PropertiesDefaultHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #4
Source File: PropertiesDefaultHandler.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #5
Source File: PropertiesDefaultHandler.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #6
Source File: PropertiesDefaultHandler.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #7
Source File: PropertiesDefaultHandler.java From hottub with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #8
Source File: PropertiesDefaultHandler.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #9
Source File: PropertiesDefaultHandler.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #10
Source File: PropertiesDefaultHandler.java From Bytecoder with Apache License 2.0 | 6 votes |
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."); */ }
Example #11
Source File: TraceHandler.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public static List<Type> createTypes() throws IOException { String[] xmls = { "trace.xml", "tracerelationdecls.xml", "traceevents.xml", "tracetypes.xml"}; TraceHandler t = new TraceHandler(); try { SAXParser parser = new SAXParserImpl(); for (String xml : xmls) { Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, () -> "Parsing " + xml); parser.parse(createInputStream(xml), t); } t.defineValues(); return new ArrayList<>(t.types.values()); } catch (SAXException e) { throw new IOException(e); } }
Example #12
Source File: PropertiesDefaultHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #13
Source File: PropertiesDefaultHandler.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #14
Source File: PropertiesDefaultHandler.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #15
Source File: PropertiesDefaultHandler.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
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."); */ }
Example #16
Source File: MetadataHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static List<Type> createTypes() throws IOException { SAXParser parser = new SAXParserImpl(); MetadataHandler t = new MetadataHandler(); try (InputStream is = new BufferedInputStream(SecuritySupport.getResourceAsStream("/jdk/jfr/internal/types/metadata.xml"))) { Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, () -> "Parsing metadata.xml"); try { parser.parse(is, t); return t.buildTypes(); } catch (Exception e) { e.printStackTrace(); throw new IOException(e); } } }
Example #17
Source File: MetadataHandler.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static List<Type> createTypes() throws IOException { SAXParser parser = new SAXParserImpl(); MetadataHandler t = new MetadataHandler(); try (InputStream is = new BufferedInputStream(SecuritySupport.getResourceAsStream("/jdk/jfr/internal/types/metadata.xml"))) { Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, () -> "Parsing metadata.xml"); try { parser.parse(is, t); return t.buildTypes(); } catch (Exception e) { e.printStackTrace(); throw new IOException(e); } } }
Example #18
Source File: JFCParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private static void parseXML(String content, JFCParserHandler ch) throws SAXException, IOException { CharArrayReader r = new CharArrayReader(content.toCharArray()); SAXParser parser = new SAXParserImpl(); parser.parse(new InputSource(r), ch); }
Example #19
Source File: JFCParser.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private static void parseXML(String content, JFCParserHandler ch) throws SAXException, IOException { CharArrayReader r = new CharArrayReader(content.toCharArray()); SAXParser parser = new SAXParserImpl(); parser.parse(new InputSource(r), ch); }
Example #20
Source File: JFCParser.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
private static void parseXML(String content, JFCParserHandler ch) throws SAXException, IOException { CharArrayReader r = new CharArrayReader(content.toCharArray()); SAXParser parser = new SAXParserImpl(); parser.parse(new InputSource(r), ch); }