⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 svgutility.java

📁 java开源的企业总线.xmlBlaster
💻 JAVA
字号:
/*------------------------------------------------------------------------------Name:      SvgUtility.javaProject:   xmlBlaster.orgCopyright: xmlBlaster.org, see xmlBlaster-LICENSE fileComment:   Demo code for a svg client using batikVersion:   $Id: SvgUtility.java 16476 2007-09-06 22:36:52Z laghi $------------------------------------------------------------------------------*/package javaclients.svg.batik;import java.io.IOException;import java.io.Reader;import java.io.InputStream;import java.io.ByteArrayInputStream;import java.io.StringReader;import org.apache.batik.dom.svg.SAXSVGDocumentFactory;import org.apache.batik.dom.svg.SVGOMDocument;/** * @author $Author: laghi $ (michele@laghi.eu) */public class SvgUtility{   private final static String PARSER_CLASSNAME = "org.apache.crimson.parser.XMLReaderImpl";   protected SvgUtility ()   {   }   public static SVGOMDocument createDocument (Reader reader, String dummyURI)      throws IOException   {      SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(PARSER_CLASSNAME);      return (org.apache.batik.dom.svg.SVGOMDocument)factory.createDocument(dummyURI, reader);   }   public static SVGOMDocument createDocument (InputStream inputStream, String dummyURI)      throws IOException   {      SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(PARSER_CLASSNAME);      return (org.apache.batik.dom.svg.SVGOMDocument)factory.createDocument(dummyURI, inputStream);   }   public static SVGOMDocument createDocument (String xmlString, String dummyURI) throws IOException   {      return createDocument(new StringReader(xmlString), dummyURI);   }   public static SVGOMDocument createDocument (byte[] byteArray, String dummyURI) throws IOException   {      return createDocument(new ByteArrayInputStream(byteArray), dummyURI);   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -