@Override public InputStream getInputStream() throws IOException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(); BlueprintTransformer.transform(createUrl(url.getPath()), os); os.close(); return new ByteArrayInputStream(os.toByteArray()); } catch (Exception e) { throw new IOException("Error opening blueprint xml url", e); } } };
public static void transform(URL url, OutputStream os) throws Exception { Document doc = parse(url); String name = getPath(url); int idx = name.lastIndexOf('/'); if (idx >= 0) { m.getMainAttributes().putValue(Constants.BUNDLE_SYMBOLICNAME, str[0]); m.getMainAttributes().putValue(Constants.BUNDLE_VERSION, str[1]); String importPkgs = getImportPackages(analyze(new DOMSource(doc))); if (importPkgs != null && importPkgs.length() > 0) { m.getMainAttributes().putValue(Constants.IMPORT_PACKAGE, importPkgs); long lastModified = getLastModified(url);
public static void transform(URL url, OutputStream os) throws Exception { Document doc = parse(url); String name = getPath(url); int idx = name.lastIndexOf('/'); if (idx >= 0) { m.getMainAttributes().putValue(Constants.BUNDLE_SYMBOLICNAME, str[0]); m.getMainAttributes().putValue(Constants.BUNDLE_VERSION, str[1]); String importPkgs = getImportPackages(analyze(new DOMSource(doc))); if (importPkgs != null && importPkgs.length() > 0) { m.getMainAttributes().putValue(Constants.IMPORT_PACKAGE, importPkgs); long lastModified = getLastModified(url);
@Override public InputStream getInputStream() throws IOException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(); BlueprintTransformer.transform(createUrl(url.getPath()), os); os.close(); return new ByteArrayInputStream(os.toByteArray()); } catch (Exception e) { throw new IOException("Error opening blueprint xml url", e); } } };
@Override public InputStream getInputStream() throws IOException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(); BlueprintTransformer.transform(new URL(url.getPath()), os); os.close(); return new ByteArrayInputStream(os.toByteArray()); } catch (Exception e) { logger.error("Error opening blueprint xml url", e); throw new IOException("Error opening blueprint xml url", e); } } }
@Override public InputStream getInputStream() throws IOException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(); BlueprintTransformer.transform(new URL(url.getPath()), os); os.close(); return new ByteArrayInputStream(os.toByteArray()); } catch (Exception e) { logger.error("Error opening blueprint xml url", e); throw new IOException("Error opening blueprint xml url", e); } } }