com.aetrion.flickr.util
Class DebugOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by com.aetrion.flickr.util.DebugOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class DebugOutputStream
extends java.io.FilterOutputStream

A FilterInputStream which will print all read data to the specified PrintWriter.

Author:
Anthony Eden

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
DebugOutputStream(java.io.OutputStream out, java.io.OutputStream debugOut)
          Creates a FilterInputStream by assigning the argument in to the field this.in so as to remember it for later use.
 
Method Summary
 void write(byte[] b)
           
 void write(byte[] b, int offset, int length)
           
 void write(int b)
           
 
Methods inherited from class java.io.FilterOutputStream
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugOutputStream

public DebugOutputStream(java.io.OutputStream out,
                         java.io.OutputStream debugOut)
Creates a FilterInputStream by assigning the argument in to the field this.in so as to remember it for later use.

Parameters:
out - the underlying output stream, or null if this instance is to be created without an underlying stream.
Method Detail

write

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

write

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

write

public void write(byte[] b,
                  int offset,
                  int length)
           throws java.io.IOException
Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException


Copyright (C) 2005-2008 Aetrion LLC. All Rights Reserved.