org.apache.commons.io.output

Class NullOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable


    public class NullOutputStreamextends OutputStream
    This OutputStream writes all data to the famous /dev/null.

    This output stream has no destination (file/socket etc.) and all bytes written to it are ignored and lost.

    Version:
    $Id: NullOutputStream.java 1674708 2015-04-20 00:02:45Z ggregory $
    • Field Detail

      • NULL_OUTPUT_STREAM

        public static final NullOutputStream NULL_OUTPUT_STREAM
        A singleton.
    • Constructor Detail

      • NullOutputStream

        public NullOutputStream()
    • Method Detail

      • write

        public void write(byte[] b,         int off,         int len)
        Does nothing - output to /dev/null.
        Overrides:
        write in class OutputStream
        Parameters:
        b - The bytes to write
        off - The start offset
        len - The number of bytes to write
      • write

        public void write(int b)
        Does nothing - output to /dev/null.
        Specified by:
        write in class OutputStream
        Parameters:
        b - The byte to write

Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14