com.aetrion.flickr.util
Class DebugInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by com.aetrion.flickr.util.DebugInputStream
All Implemented Interfaces:
java.io.Closeable

public class DebugInputStream
extends java.io.FilterInputStream

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

Author:
Anthony Eden

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
DebugInputStream(java.io.InputStream in, 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
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int offset, int length)
           
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugInputStream

public DebugInputStream(java.io.InputStream in,
                        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:
in - the underlying input stream, or null if this instance is to be created without an underlying stream.
Method Detail

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Overrides:
read in class java.io.FilterInputStream
Throws:
java.io.IOException

read

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


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