org.apache.commons.io.output

Class NullWriter

  • All Implemented Interfaces:
    Closeable, Flushable, Appendable, AutoCloseable


    public class NullWriterextends Writer
    This Writer writes all data to the famous /dev/null.

    This Writer has no destination (file/socket etc.) and all characters written to it are ignored and lost.

    Version:
    $Id: NullWriter.java 1471767 2013-04-24 23:24:19Z sebb $
    • Field Detail

      • NULL_WRITER

        public static final NullWriter NULL_WRITER
        A singleton.
    • Constructor Detail

      • NullWriter

        public NullWriter()
        Constructs a new NullWriter.
    • Method Detail

      • append

        public Writer append(char c)
        Does nothing - output to /dev/null.
        Specified by:
        append in interface Appendable
        Overrides:
        append in class Writer
        Parameters:
        c - The character to write
        Returns:
        this writer
        Since:
        2.0
      • append

        public Writer append(CharSequence csq,            int start,            int end)
        Does nothing - output to /dev/null.
        Specified by:
        append in interface Appendable
        Overrides:
        append in class Writer
        Parameters:
        csq - The character sequence to write
        start - The index of the first character to write
        end - The index of the first character to write (exclusive)
        Returns:
        this writer
        Since:
        2.0
      • append

        public Writer append(CharSequence csq)
        Does nothing - output to /dev/null.
        Specified by:
        append in interface Appendable
        Overrides:
        append in class Writer
        Parameters:
        csq - The character sequence to write
        Returns:
        this writer
        Since:
        2.0
      • write

        public void write(int idx)
        Does nothing - output to /dev/null.
        Overrides:
        write in class Writer
        Parameters:
        idx - The character to write
      • write

        public void write(char[] chr)
        Does nothing - output to /dev/null.
        Overrides:
        write in class Writer
        Parameters:
        chr - The characters to write
      • write

        public void write(char[] chr,         int st,         int end)
        Does nothing - output to /dev/null.
        Specified by:
        write in class Writer
        Parameters:
        chr - The characters to write
        st - The start offset
        end - The number of characters to write
      • write

        public void write(String str)
        Does nothing - output to /dev/null.
        Overrides:
        write in class Writer
        Parameters:
        str - The string to write
      • write

        public void write(String str,         int st,         int end)
        Does nothing - output to /dev/null.
        Overrides:
        write in class Writer
        Parameters:
        str - The string to write
        st - The start offset
        end - The number of characters 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