Package at.bestsolution.efxclipse.formats.svg.handler

Examples of at.bestsolution.efxclipse.formats.svg.handler.XMLLoader.loadDocument()


import at.bestsolution.efxclipse.formats.svg.svg.SvgSvgElement;

public class SVGStreamConverter {
  public void converter(InputStream inputStream, OutputStream outputStream) throws Exception {
    XMLLoader loader = new XMLLoader();
    SvgSvgElement rootElement = loader.loadDocument(null, inputStream);
    FXMLConverter converter = new FXMLConverter(rootElement);
    outputStream.write(converter.generate().toString().getBytes());
  }
}
View Full Code Here


    }
   
    File outFile = new File(toFile);
   
    XMLLoader l = new XMLLoader();
    SvgSvgElement svgRoot = l.loadDocument(outFile.getAbsolutePath(), in);
    FXMLConverter converter = new FXMLConverter(svgRoot);
    FileOutputStream out = new FileOutputStream(outFile);
    out.write(converter.generate().toString().getBytes());
    out.close();
  }
View Full Code Here

  @Override
  protected String convert(IFile outFile, IFile file) throws ExecutionException {
    try {
      XMLLoader loader = new XMLLoader();
      SvgSvgElement root = loader.loadDocument(outFile.getFullPath().toOSString(), file.getContents());
      return new FXMLConverter(root).generate().toString();
    } catch (Exception e) {
      throw new ExecutionException("Conversion failed", e);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.