Examples of NullWriter


Examples of org.apache.tiles.freemarker.io.NullWriter

     * @since 2.2.0
     */
    public static void evaluateBody(TemplateDirectiveBody body)
            throws TemplateException, IOException {
        if (body != null) {
            NullWriter writer = new NullWriter();
            try {
                body.render(writer);
            } finally {
                writer.close();
            }
        }
    }
View Full Code Here

Examples of org.jboss.internal.soa.esb.util.NullWriter

        public OneWayResponseWrapper(HttpServletResponse httpServletResponse) {
            super(httpServletResponse);
        }

        public PrintWriter getWriter() throws IOException {
            return new PrintWriter(new NullWriter());
        }
View Full Code Here

Examples of org.milyn.io.NullWriter

        Smooks smooks = new Smooks(getClass().getResourceAsStream(config));
        ExecutionContext execContext = smooks.createExecutionContext();
        StreamSource source = new StreamSource(getClass().getResourceAsStream(sourceFile));

        execContext.setEventListener(eventListener);
        smooks.filterSource(execContext, source, new StreamResult(new NullWriter()));
    }
View Full Code Here

Examples of org.milyn.io.NullWriter

        // Claim ownership of the writer for this fragment element...
        Writer writer = element.getWriter(this);

        if(!keepChildren) {
            // Swap in a NullWriter instance for the whole fragment...
            element.setWriter(new NullWriter(), this);
            // Stash the real writer instance on the element so we can reset it at the end...
            element.setCache(this, writer);
        } else {
            // Just don't write this element, but write the child elements...
        }
View Full Code Here

Examples of org.milyn.io.NullWriter

                if(templateBefore != null) {
                    applyTemplate(templateBefore, element, executionContext);
                } else if(executionContext.isDefaultSerializationOn()) {
                    // If Default Serialization is on, we want to block output to the
                    // output stream...
                    element.setWriter(new NullWriter(currentWriter), this);
                }
            } else if (getAction() != Action.REPLACE && getAction() != Action.BIND_TO) {
                // write the start of the element...
                if (executionContext.getDeliveryConfig().isDefaultSerializationOn()) {
                    targetWriter.visitBefore(element, executionContext);
View Full Code Here

Examples of org.milyn.io.NullWriter

        //System.out.println(writer.toString());
    }

    private void runTransform(String config) throws IOException, SAXException, InterruptedException {
        Smooks smooks = new Smooks(getClass().getResourceAsStream(config));
        NullWriter writer = new NullWriter();

        // warm ups...
        runTransform(smooks, writer);
        runTransform(smooks, writer);
View Full Code Here

Examples of org.milyn.io.NullWriter

    }


    protected Writer getWriter(Result result, ExecutionContext executionContext) {
        if (!(result instanceof StreamResult)) {
            return new NullWriter();
        }

        StreamResult streamResult = (StreamResult) result;
        if (streamResult.getWriter() != null) {
            return streamResult.getWriter();
View Full Code Here

Examples of org.milyn.io.NullWriter

        return new NullReader();
    }

    protected Writer getWriter(Result result, ExecutionContext executionContext) {
        if(!(result instanceof StreamResult)) {
            return new NullWriter();
        }

        StreamResult streamResult = (StreamResult) result;
        if(streamResult.getWriter() != null) {
            return streamResult.getWriter();
View Full Code Here

Examples of org.openstreetmap.osmosis.core.misc.v0_6.NullWriter

 
  private DataPostboxLoadInjector() {
    buffer = new EntityBuffer(10000);
    progressLogger = new EntityProgressLogger(5000, null);
    buffer.setSink(progressLogger);
    nullWriter = new NullWriter();
    progressLogger.setSink(nullWriter);
  }
View Full Code Here

Examples of org.zkoss.io.NullWriter

   
    Filter filter = (Filter) SpringUtil.getBean("zkFilterChainProxy");
    if (filter != null) {
      ServletRequest request = (ServletRequest) exec.getNativeRequest();
      ServletResponse response = (ServletResponse) exec.getNativeResponse();
      ServletResponse resp = BufferedResponse.getInstance(response, new NullWriter());
      try {
        filter.doFilter(request, resp, new NullFilterChain());
      } catch(Exception ex1) {
        throw UiException.Aide.wrap(ex1); //should never occur
      }
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.