gnu.iou
Class dbo

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--gnu.iou.bbo
              |
              +--gnu.iou.dbo

public class dbo
extends bbo

Debugging `bbo' copies writes to file.

Author:
John Pritchard (john@syntelos.org)
See Also:
bbo

Field Summary
protected  java.io.PrintStream debugCopy
           
protected  boolean debugCopyTrace
           
 
Constructor Summary
dbo(java.lang.String debugCopyFilename, boolean trace)
          Debug mode, tee this stream into a file.
 
Method Summary
 void close()
           
 void flush()
           
 bbuf getByteBuffer()
           
 int length()
           
 void reset()
           
 byte[] toByteArray()
           
protected  void trace()
           
 void write(byte[] b)
           
 void write(byte[] b, int ofs, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debugCopy

protected java.io.PrintStream debugCopy

debugCopyTrace

protected boolean debugCopyTrace
Constructor Detail

dbo

public dbo(java.lang.String debugCopyFilename,
           boolean trace)
    throws java.io.IOException
Debug mode, tee this stream into a file.
Parameters:
debugCopyFilename - Copy everything on this stream into this file
trace - If true, print stack traces before each method invocation.
Throws:
java.io.IOException - Construction file output stream.
Method Detail

trace

protected void trace()

write

public void write(int b)
           throws java.io.IOException
Overrides:
write in class bbo

write

public void write(byte[] b)
           throws java.io.IOException
Overrides:
write in class bbo

write

public void write(byte[] b,
                  int ofs,
                  int len)
           throws java.io.IOException
Overrides:
write in class bbo

flush

public void flush()
           throws java.io.IOException
Overrides:
flush in class bbo

close

public void close()
           throws java.io.IOException
Overrides:
close in class bbo

getByteBuffer

public bbuf getByteBuffer()
Overrides:
getByteBuffer in class bbo

length

public int length()
Overrides:
length in class bbo

reset

public void reset()
Overrides:
reset in class bbo

toByteArray

public byte[] toByteArray()
Overrides:
toByteArray in class bbo