de.dante.extex.backend.outputStream
Class NamedOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byde.dante.extex.backend.outputStream.NamedOutputStream

public class NamedOutputStream
extends java.io.OutputStream

This class provides a delegate to an output stream with an additional name.

Version:
$Revision: 1.3 $
Author:
Gerd Neugebauer

Constructor Summary
NamedOutputStream(java.lang.String name, java.io.OutputStream stream)
          Creates a new object.
 
Method Summary
 void close()
           
 boolean equals(java.lang.Object obj)
           
 void flush()
           
 java.lang.String getName()
          Getter for the destination.
 int hashCode()
           
 java.lang.String toString()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedOutputStream

public NamedOutputStream(java.lang.String name,
                         java.io.OutputStream stream)
Creates a new object.

Parameters:
name - the name
stream - the stream
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.close()

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.flush()

getName

public java.lang.String getName()
Getter for the destination. The destination is some printable representation describing where the output went to.

Returns:
the name of the destination

hashCode

public int hashCode()
See Also:
Object.hashCode()

toString

public java.lang.String toString()
See Also:
Object.toString()

write

public void write(byte[] b)
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.write(byte[])

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.write(byte[], int, int)

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.write(int)