Examples of NullReader


Examples of org.apache.commons.io.input.NullReader

    /**
     * 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
        reader.close();

        // Test copyLarge() method
        assertEquals("copyLarge()", size, IOUtils.copyLarge(reader, writer));

    }
View Full Code Here

Examples of org.apache.commons.io.input.NullReader

             {
                 reader = fileSpec.createReader();
             }
             catch (FileNotFoundException e)
             {
                 reader = new NullReader(0);
             }

             return new LineNumberReader(reader);
         }
View Full Code Here

Examples of org.apache.commons.io.input.NullReader

    /**
     * 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
        reader.close();

        // Test copyLarge() method
        assertEquals("copyLarge()", size, IOUtils.copyLarge(reader, writer));

    }
View Full Code Here

Examples of org.apache.commons.io.input.NullReader

    /**
     * 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
        reader.close();

        // Test copyLarge() method
        assertEquals("copyLarge()", size, IOUtils.copyLarge(reader, writer));

    }
View Full Code Here

Examples of org.apache.commons.io.input.NullReader

    /**
     * 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
        reader.close();

        // Test copyLarge() method
        assertEquals("copyLarge()", size, IOUtils.copyLarge(reader, writer));

    }
View Full Code Here

Examples of org.apache.commons.io.input.NullReader

    /**
     * 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
        reader.close();

        // Test copyLarge() method
        assertEquals("copyLarge()", size, IOUtils.copyLarge(reader, writer));

    }
View Full Code Here

Examples of org.apache.commons.io.input.NullReader

    /**
     * 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
        reader.close();

        // Test copyLarge() method
        assertEquals("copyLarge()", size, IOUtils.copyLarge(reader, writer));

    }
View Full Code Here

Examples of org.milyn.io.NullReader

      } else if (source.getSystemId() != null) {
        return systemIdToReader(source.getSystemId(), contentEncoding);
      }
      }
     
        return new NullReader();
    }
View Full Code Here

Examples of org.milyn.io.NullReader

            } else {
                throw new SmooksException("Invalid " + StreamSource.class.getName() + ".  No InputStream or Reader instance.");
            }
        }

        return new NullReader();
    }
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.