edu.rice.cs.plt.io
Class VoidWriter

java.lang.Object
  extended by java.io.Writer
      extended by edu.rice.cs.plt.io.DirectWriter
          extended by edu.rice.cs.plt.io.VoidWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class VoidWriter
extends DirectWriter

A Writer that discards all data written to it.


Field Summary
static VoidWriter INSTANCE
           
 
Fields inherited from class edu.rice.cs.plt.io.DirectWriter
DEFAULT_BUFFER_SIZE
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
protected VoidWriter()
           
 
Method Summary
 java.io.Writer append(char c)
           
 java.io.Writer append(java.lang.CharSequence s)
           
 java.io.Writer append(java.lang.CharSequence s, int start, int end)
           
 void close()
           
 void flush()
           
 void write(char[] cbuf)
           
 void write(char[] cbuf, int offset, int len)
           
 void write(int c)
           
 void write(java.lang.String s)
           
 void write(java.lang.String s, int offset, int len)
           
 
Methods inherited from class edu.rice.cs.plt.io.DirectWriter
write, write, write, writeAll, writeAll, writeAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final VoidWriter INSTANCE
Constructor Detail

VoidWriter

protected VoidWriter()
Method Detail

append

public java.io.Writer append(char c)
Specified by:
append in interface java.lang.Appendable
Overrides:
append in class java.io.Writer

append

public java.io.Writer append(java.lang.CharSequence s)
Specified by:
append in interface java.lang.Appendable
Overrides:
append in class java.io.Writer

append

public java.io.Writer append(java.lang.CharSequence s,
                             int start,
                             int end)
Specified by:
append in interface java.lang.Appendable
Overrides:
append in class java.io.Writer

close

public void close()
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer

flush

public void flush()
Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer

write

public void write(char[] cbuf)
Overrides:
write in class java.io.Writer

write

public void write(char[] cbuf,
                  int offset,
                  int len)
Specified by:
write in class java.io.Writer

write

public void write(int c)
Overrides:
write in class java.io.Writer

write

public void write(java.lang.String s)
Overrides:
write in class java.io.Writer

write

public void write(java.lang.String s,
                  int offset,
                  int len)
Overrides:
write in class java.io.Writer