org.basex.io
Class BufferedOutput

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

public final class BufferedOutput
extends OutputStream

This class serves as a buffered wrapper for output streams.

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

Constructor Summary
BufferedOutput(OutputStream outstream)
          Constructor with a default buffer size.
BufferedOutput(OutputStream out, int bufs)
          Constructor with a specific buffer size.
 
Method Summary
 void close()
           
 void flush()
           
 void write(int b)
           
 
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

BufferedOutput

public BufferedOutput(OutputStream outstream)
Constructor with a default buffer size.

Parameters:
outstream - the OutputStream we operate on

BufferedOutput

public BufferedOutput(OutputStream out,
                      int bufs)
Constructor with a specific buffer size.

Parameters:
out - the OutputStream we operate on
bufs - buffer size
Method Detail

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException