public static UpdateSite read(InputStream is) throws IOException { try { return new UpdateSite(parser.parse(new XMLIOSource(is))); } finally { IOUtil.close(is); } }
public static UpdateSite read(InputStream is) throws IOException { try { return new UpdateSite(parser.parse(new XMLIOSource(is))); } finally { IOUtil.close(is); } }
public static Feature read(InputStream input) throws IOException { try { return new Feature(parser.parse(new XMLIOSource(input))); } finally { IOUtil.close(input); } }
public static Feature read(InputStream input) throws IOException { try { return new Feature(parser.parse(new XMLIOSource(input))); } finally { IOUtil.close(input); } }
public static ProductConfiguration read(InputStream input) throws IOException { try { return new ProductConfiguration(parser.parse(new XMLIOSource(input))); } finally { IOUtil.close(input); } }
public static Category read(InputStream is) throws IOException { try { return new Category(parser.parse(new XMLIOSource(is))); } finally { IOUtil.close(is); } }
public static ProductConfiguration read(InputStream input) throws IOException { try { return new ProductConfiguration(parser.parse(new XMLIOSource(input))); } finally { IOUtil.close(input); } }
public static Category read(InputStream is) throws IOException { try { return new Category(parser.parse(new XMLIOSource(is))); } finally { IOUtil.close(is); } }
public static Target read( File file ) throws IOException { FileInputStream input = new FileInputStream( file ); try { return new Target( parser.parse( new XMLIOSource( input ) ) ); } finally { IOUtil.close( input ); } }
public static Category read( InputStream is ) throws IOException { try { return new Category( parser.parse( new XMLIOSource( is ) ) ); } finally { IOUtil.close( is ); } }
public static UpdateSite read( InputStream is ) throws IOException { try { return new UpdateSite( parser.parse( new XMLIOSource( is ) ) ); } finally { IOUtil.close( is ); } }
public static ProductConfiguration read( InputStream input ) throws IOException { try { return new ProductConfiguration( parser.parse( new XMLIOSource( input ) ) ); } finally { IOUtil.close( input ); } }
public static Feature read( InputStream input ) throws IOException { try { return new Feature( parser.parse( new XMLIOSource( input ) ) ); } finally { IOUtil.close( input ); } }
/** Convenience method to parse a file into XML. * @throws IOException */ public static Document parse (File file) throws IOException { XMLIOSource source = new XMLIOSource (file); XMLParser parser = new XMLParser (); return parser.parse (source); } }
public void merge(InputStream in) throws IOException { merge(new XMLParser().parse(new XMLIOSource(in))); }
public void merge(Reader r) throws IOException { merge(new XMLParser().parse(new XMLIOSource(r))); }
protected Document createExemplarDoc() throws IOException { String exemplar = "io/fabric8/camel/tooling/exemplar.xml"; URL url = findResource(exemplar, null); if (url != null) { return parse(new XMLIOSource(url)); } else { LOG.warn("Could not find file {} on the class path", exemplar); Document d = new Document(); d.addNode(new Element("beans", springNamespace)); return d; } }
protected Document createExemplarDoc() throws IOException { String exemplar = "io/fabric8/camel/tooling/exemplar.xml"; URL url = findResource(exemplar, null); if (url != null) { return parse(new XMLIOSource(url)); } else { LOG.warn("Could not find file {} on the class path", exemplar); Document d = new Document(); d.addNode(new Element("beans", springNamespace)); return d; } }
/** * Parses the generic artifact information of a feature. * * @param in The input stream of the feature.xml * @return The generic description * @throws IOException If a parser error occurred */ private static GenericP2Artifact parseFeature(InputStream in) throws IOException { // no closing of input stream required - our caller will close the jar // at the end final Feature f = new Feature(new XMLParser().parse(new XMLIOSource(in))); return new GenericP2Artifact(f.getId(), f.getVersion(), P2ArtifactType.FEATURE); }
public JdkReleases parse(InputStream in) throws IOException { Document doc = new XMLParser().parse(new XMLIOSource(in)); JdkReleases.Builder builder = JdkReleases.newBuilder(); parseDoc(doc, builder); return builder.build(); }