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

Examples of at.bestsolution.efxclipse.formats.svg.handler.XMLLoader


import at.bestsolution.efxclipse.formats.svg.handler.XMLLoader;
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


      in = new FileInputStream(f);
    }
   
    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

public class ConvertSVGHandler extends AbstractConverterHandler {

  @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

Related Classes of at.bestsolution.efxclipse.formats.svg.handler.XMLLoader

Copyright © 2018 www.massapicom. 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.