Examples of NullWriter


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

     * Test Copying file > 2GB  - see issue# IO-84
     */
    public void testCopy_readerToWriter_IO84() throws Exception {
        long size = (long)Integer.MAX_VALUE + (long)1;
        Reader reader = new NullReader(size);
        Writer writer = new NullWriter();

        // Test copy() method
        assertEquals(-1, IOUtils.copy(reader, writer));

        // reset the input
View Full Code Here

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

     * Test Copying file > 2GB  - see issue# IO-84
     */
    public void testCopy_readerToWriter_IO84() throws Exception {
        long size = (long)Integer.MAX_VALUE + (long)1;
        Reader reader = new NullReader(size);
        Writer writer = new NullWriter();

        // Test copy() method
        assertEquals(-1, IOUtils.copy(reader, writer));

        // reset the input
View Full Code Here

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

            System.setErr(spiedErr);

            JumiBootstrap bootstrap = new JumiBootstrap();
            bootstrap.suite.setTestClasses(OnePassingTest.class);
            bootstrap.daemon.setIdleTimeout(0); // we want the daemon process to exit quickly
            bootstrap.setTextUiOutput(new NullWriter());
            bootstrap.enableDebugMode(); // <-- the thing we are testing
            bootstrap.runSuite();

            Thread.sleep(50); // wait for the daemon process to exit, and our printer thread to notice it
            assertThat("this test has a problem; daemon printed nothing", printed.size(), is(not(0)));
View Full Code Here

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

     * Test Copying file > 2GB  - see issue# IO-84
     */
    public void testCopy_readerToWriter_IO84() throws Exception {
        long size = (long)Integer.MAX_VALUE + (long)1;
        Reader reader = new NullReader(size);
        Writer writer = new NullWriter();

        // Test copy() method
        assertEquals(-1, IOUtils.copy(reader, writer));

        // reset the input
View Full Code Here

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

     * Test Copying file > 2GB  - see issue# IO-84
     */
    public void testCopy_readerToWriter_IO84() throws Exception {
        long size = (long)Integer.MAX_VALUE + (long)1;
        Reader reader = new NullReader(size);
        Writer writer = new NullWriter();

        // Test copy() method
        assertEquals(-1, IOUtils.copy(reader, writer));

        // reset the input
View Full Code Here

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

            catch (IOException e) {
                throw new RuntimeException("", e);
            }
        }
        else {
            sqlWriter = new NullWriter();
        }
        return new PrintWriter(sqlWriter);
    }
View Full Code Here

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

    {
      flatClasspath = StringUtils.join(_classpath, ":");
    }

    final PrintWriter sysoutWriter = new PrintWriter(System.out, true);
    final PrintWriter nullWriter = new PrintWriter(new NullWriter());
    final List<String> javadocArgs = new ArrayList<String>(Arrays.asList("-classpath",
                                                                         flatClasspath,
                                                                         "-sourcepath",
                                                                         StringUtils.join(_sourcePaths, ":")));
    if (_resourcePackages != null)
View Full Code Here

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

     * Test Copying file > 2GB  - see issue# IO-84
     */
    public void testCopy_readerToWriter_IO84() throws Exception {
        final long size = (long)Integer.MAX_VALUE + (long)1;
        final Reader reader = new NullReader(size);
        final Writer writer = new NullWriter();

        // Test copy() method
        assertEquals(-1, IOUtils.copy(reader, writer));

        // reset the input
View Full Code Here

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) {
        CssLintMojo.this.onException(e);
View Full Code Here

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

        getProgressIndicator().onProcessingResource(resource);
        if (resource != null) {
          getLog().info("processing resource: " + resource.getUri());
        }
        // 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) {
        JsLintMojo.this.onException(e);
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.