Package org.apache.commons.io.output

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


        props.put("root", "file:./");
        props.put("cachableDuration", "1500");
        reg.init(props);
       
        OMNode node = reg.lookup(FILE2);
        node.serialize(new NullOutputStream());
    }
View Full Code Here


                            } else {
                                target = new TeeOutputStream(output,baos);
                            }
                        }
                        if (target == null){
                            target=new NullOutputStream();
                        }
                        input = ftp.retrieveFileStream(remote);
                        if (input == null){// Could not access file or other error
                            res.setResponseCode(Integer.toString(ftp.getReplyCode()));
                            res.setResponseMessage(ftp.getReplyString());
View Full Code Here

        OMOutputFormat mtomOutputFormat = new OMOutputFormat();
        mtomOutputFormat.setDoOptimize(true);
        OMOutputFormat baseOutputFormat = new OMOutputFormat();
        baseOutputFormat.setDoOptimize(false);

        envelope.serializeAndConsume(new NullOutputStream(), baseOutputFormat);
        envelope.serializeAndConsume(new NullOutputStream(), mtomOutputFormat);
    }
View Full Code Here

    Display display = Display.getDefault();
    errorLineColor = new Color(display, new RGB(255,220,220));
    container = RubyStepFactory.createScriptingContainer(false, version);

    // do not litter the console with potential parse errors
    container.setError(new PrintStream(new NullOutputStream()));
    container.setOutput(new PrintStream(new NullOutputStream()));

   
  }
View Full Code Here

        private static final long serialVersionUID = 1L;

        @Override
        public PrintStream getLogger() {
            return new PrintStream(new NullOutputStream());
        }
View Full Code Here

                                    return false;
                                }

                                @Override
                                public OutputStream getOutputStream() {
                                    return new NullOutputStream();
                                }
                            });
                        }
                    } else {
                        consoleString += "<br>No files detected...";
View Full Code Here

                        StreamVariable streamVariable = new StreamVariable() {

                            @Override
                            public OutputStream getOutputStream() {
                                return new NullOutputStream();
                            }

                            @Override
                            public boolean listenProgress() {
                                return true;
View Full Code Here

            throw new IllegalArgumentException("Checksums can't be computed on directories");
        }
        InputStream in = null;
        try {
            in = new CheckedInputStream(new FileInputStream(file), checksum);
            IOUtils.copy(in, new NullOutputStream());
        } finally {
            IOUtils.closeQuietly(in);
        }
        return checksum;
    }
View Full Code Here

   
    protected void assertConsumed(OMContainer container) {
        assertFalse("Expected the node to be incomplete", container.isComplete());
        boolean isConsumed;
        try {
            container.serialize(new NullOutputStream());
            isConsumed = false;
        } catch (Exception ex) {
            isConsumed = true;
        }
        assertTrue(isConsumed);
View Full Code Here

     * Test Copying file > 2GB  - see issue# IO-84
     */
    public void testCopy_inputStreamToOutputStream_IO84() throws Exception {
        long size = (long)Integer.MAX_VALUE + (long)1;
        InputStream  in  = new NullInputStream(size);
        OutputStream out = new NullOutputStream();

        // Test copy() method
        assertEquals(-1, IOUtils.copy(in, out));

        // reset the input
View Full Code Here

TOP

Related Classes of org.apache.commons.io.output.NullOutputStream

Copyright © 2018 www.massapicom. 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.