GXPARSE hosted by SourceForge.net Logo

ca.gorman.io
Class NullOutputWriter

java.lang.Object
  extended by java.io.Writer
      extended by ca.gorman.io.NullOutputWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class NullOutputWriter
extends Writer

Writer that discards all output. Used when sending output to a different Writer is the simplest way to discard the output. This class is the Java equivalent of the /dev/null device in Unix and Linux or the nul device in Windows.


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
NullOutputWriter()
           
 
Method Summary
 void close()
           Do nothing.
 void flush()
           Do nothing.
 void write(char[] cbuf)
           Do nothing.
 void write(char[] cbuf, int off, int len)
           Do nothing.
 void write(int c)
           Do nothing.
 void write(String str)
           Do nothing.
 void write(String str, int off, int len)
           Do nothing.
 
Methods inherited from class java.io.Writer
append, append, append
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullOutputWriter

public NullOutputWriter()
Method Detail

close

public void close()
           throws IOException

Do nothing.

Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException
See Also:
Writer.close()

flush

public void flush()
           throws IOException

Do nothing.

Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException
See Also:
Writer.flush()

write

public void write(char[] cbuf)
           throws IOException

Do nothing.

Overrides:
write in class Writer
Throws:
IOException
See Also:
Writer.write(char[])

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException

Do nothing.

Specified by:
write in class Writer
Throws:
IOException
See Also:
Writer.write(char[], int, int)

write

public void write(int c)
           throws IOException

Do nothing.

Overrides:
write in class Writer
Throws:
IOException
See Also:
Writer.write(int)

write

public void write(String str)
           throws IOException

Do nothing.

Overrides:
write in class Writer
Throws:
IOException
See Also:
Writer.write(String)

write

public void write(String str,
                  int off,
                  int len)
           throws IOException

Do nothing.

Overrides:
write in class Writer
Throws:
IOException
See Also:
Writer.write(String, int, int)

GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License