Examples of NullWriter


Examples of org.apache.commons.io.output.NullWriter

      @Override
      public void process(final Resource resource, final Reader reader, final Writer writer)
          throws IOException {
        getProgressIndicator().onProcessingResource(resource);
        // use StringWriter to discard the merged processed result (linting is useful only for reporting errors).
        super.process(resource, reader, new NullWriter());
      }

      @Override
      protected void onException(final WroRuntimeException e) {
        JsHintMojo.this.onException(e);
View Full Code Here

Examples of org.apache.commons.io.output.NullWriter

      throws Exception {
    WroTestUtils.runConcurrently(ContextPropagatingCallable.decorate(new Callable<Void>() {
      @Override
      public Void call()
          throws Exception {
        victim.process(new StringReader(""), new NullWriter());
        return null;
      }
    }));
  }
View Full Code Here

Examples of org.apache.commons.io.output.NullWriter

  private static ScriptRunner newScriptRunner(Connection connection) {
    ScriptRunner scriptRunner = new ScriptRunner(connection);
    scriptRunner.setDelimiter(";");
    scriptRunner.setStopOnError(true);
    scriptRunner.setLogWriter(new PrintWriter(new NullWriter()));
    return scriptRunner;
  }
View Full Code Here

Examples of org.apache.commons.io.output.NullWriter

            HttpURLConnection con = (HttpURLConnection) ProxyConfiguration.open(url);
            cookie = con.getHeaderField("Set-Cookie");
            LOGGER.fine("Cookie="+cookie);

            Tidy tidy = new Tidy();
            tidy.setErrout(new PrintWriter(new NullWriter()));
            DOMReader domReader = new DOMReader();
            Document dom = domReader.read(tidy.parseDOM(con.getInputStream(), null));

            form = null;
            for (Element e : (List<Element>)dom.selectNodes("//form")) {
View Full Code Here

Examples of org.apache.commons.io.output.NullWriter

    public void setUp()
    {
        context = new Mockery();
        con = context.mock( JMXConnector.class );
        session =
            new SessionImpl( new WriterCommandOutput( new NullWriter() ), null,
                             new UnsupportedJavaProcessManager( "testing" ) )
            {
                @Override
                protected JMXConnector doConnect( JMXServiceURL url, Map<String, Object> env )
                    throws IOException
View Full Code Here

Examples of org.apache.commons.io.output.NullWriter

     */
    public WriterCommandOutput( Writer resultOutput, Writer messageOutput )
    {
        Validate.notNull( resultOutput, "Result output can't be NULL" );
        this.resultOutput = resultOutput;
        this.messageOutput = messageOutput == null ? new NullWriter() : messageOutput;
    }
View Full Code Here

Examples of org.apache.commons.io.output.NullWriter

public class TemplateBasedApplierTest {

  @Test
  public void shouldThrowUsageExceptionWhenTemplateNotFound() throws Exception {
    TemplateBasedApplier applier = new TemplateBasedApplier(new NullWriter(), "some_complete_rubbish", null, ";", DelimiterType.normal, null);
    try {
      applier.apply(null);
      Assert.fail("expected exception");
    } catch (UsageException e) {
      assertThat(e.getMessage(), is("Could not find template named some_complete_rubbish_apply.ftl\n" +
View Full Code Here

Examples of org.apache.tapestry.engine.NullWriter

        {
            list[i] = new TestRender();
            c.addOuterTest(list[i]);
        }

        IMarkupWriter writer = new NullWriter();

        c.testRenderComponent(writer, null);

        for (int i = 0; i < list.length; i++)
            assertTrue("Outer object #" + i + " did render.", list[i].rendered);
View Full Code Here

Examples of org.apache.tapestry.engine.NullWriter

     * large number of objects.
     */

    public void testOuter() throws Exception
    {
        IMarkupWriter writer = new NullWriter();
        IRequestCycle cycle = newMock(IRequestCycle.class);
       
        Creator creator = new Creator();
       
        FakeComponent c = (FakeComponent) creator.newInstance(FakeComponent.class);
View Full Code Here

Examples of org.apache.tiles.autotag.core.runtime.util.NullWriter

        return body;
    }

    @Override
    public void evaluateWithoutWriting() throws IOException {
        NullWriter writer = new NullWriter();
        try {
            evaluate(writer);
        } finally {
            writer.close();
        }
    }
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.