org.basex.io
Class NullOutput

java.lang.Object
  extended by java.io.OutputStream
      extended by org.basex.io.PrintOutput
          extended by org.basex.io.NullOutput
All Implemented Interfaces:
Closeable, Flushable

public final class NullOutput
extends PrintOutput

This class swallows all data it receives.

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen, Tim Petrowsky

Constructor Summary
NullOutput()
          Constructor.
NullOutput(boolean s)
          Constructor.
 
Method Summary
 void close()
           
 boolean finished()
          Checks if stream can output more characters; can be overwritten to interrupt streaming at some point.
 void flush()
           
 void write(int b)
           
 
Methods inherited from class org.basex.io.PrintOutput
print, print, print, println, println, println, size
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullOutput

public NullOutput()
Constructor.


NullOutput

public NullOutput(boolean s)
Constructor.

Parameters:
s - flag for stopping serialization as early as possible
Method Detail

write

public void write(int b)
Overrides:
write in class PrintOutput

flush

public void flush()
Specified by:
flush in interface Flushable
Overrides:
flush in class PrintOutput

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class PrintOutput

finished

public boolean finished()
Description copied from class: PrintOutput
Checks if stream can output more characters; can be overwritten to interrupt streaming at some point.

Overrides:
finished in class PrintOutput
Returns:
result of check