Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory#setOutputMethod()
The following examples show how to use
com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory#setOutputMethod() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractTranslet.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 2
Source File: AbstractTranslet.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(_overrideDefaultParser); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 3
Source File: AbstractTranslet.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 4
Source File: AbstractTranslet.java From JDKSourceCode1.8 with MIT License | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(_overrideDefaultParser); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 5
Source File: AbstractTranslet.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(_overrideDefaultParser); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 6
Source File: AbstractTranslet.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(_overrideDefaultParser); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 7
Source File: AbstractTranslet.java From Bytecoder with Apache License 2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory .newInstance(_overrideDefaultParser, _msgHandler.getErrorListener()); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } output = new FileOutputStream(filename, append); factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(output)); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 8
Source File: AbstractTranslet.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } output = new FileOutputStream(filename, append); factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(output)); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 9
Source File: AbstractTranslet.java From hottub with GNU General Public License v2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 10
Source File: AbstractTranslet.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }
Example 11
Source File: AbstractTranslet.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/************************************************************************ * Multiple output document extension. * See compiler/TransletOutput for actual implementation. ************************************************************************/ public SerializationHandler openOutputHandler(String filename, boolean append) throws TransletException { try { final TransletOutputHandlerFactory factory = TransletOutputHandlerFactory.newInstance(); String dirStr = new File(filename).getParent(); if ((null != dirStr) && (dirStr.length() > 0)) { File dir = new File(dirStr); dir.mkdirs(); } factory.setEncoding(_encoding); factory.setOutputMethod(_method); factory.setOutputStream(new BufferedOutputStream(new FileOutputStream(filename, append))); factory.setOutputType(TransletOutputHandlerFactory.STREAM); final SerializationHandler handler = factory.getSerializationHandler(); transferOutputSettings(handler); handler.startDocument(); return handler; } catch (Exception e) { throw new TransletException(e); } }