com.dtolabs.rundeck.core.utils
Class FormattedOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by com.dtolabs.rundeck.core.utils.FormattedOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

Deprecated.

public class FormattedOutputStream
extends java.io.FilterOutputStream

FormattedOutputStream buffers the output data and then outputs each line after reformatting the line using the specified Reformatter. Context Data can be set via setContext(String, String).


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
FormattedOutputStream(Reformatter reformatter, java.io.OutputStream sink)
          Deprecated. Create a new FormattedOutputStream
 
Method Summary
 void close()
          Deprecated.  
 java.util.Map<java.lang.String,java.lang.String> getContext()
          Deprecated. Return the context map
 java.io.OutputStream getOriginalSink()
          Deprecated. Return original OutputStream sink
 void setContext(java.lang.String key, java.lang.String value)
          Deprecated. Set a context data value to be used by the Reformatter
 void write(int b)
          Deprecated. Overrides the FilterOutputStream method to buffer the data.
 
Methods inherited from class java.io.FilterOutputStream
flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormattedOutputStream

public FormattedOutputStream(Reformatter reformatter,
                             java.io.OutputStream sink)
Deprecated. 
Create a new FormattedOutputStream

Parameters:
reformatter - reformatter or null
sink - destination OutputStream
Method Detail

write

public void write(int b)
           throws java.io.IOException
Deprecated. 
Overrides the FilterOutputStream method to buffer the data. When a newline is encountered the buffered data is reformatted and written to the underlying output stream.

Overrides:
write in class java.io.FilterOutputStream
Parameters:
b -
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Deprecated. 
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterOutputStream
Throws:
java.io.IOException

getContext

public java.util.Map<java.lang.String,java.lang.String> getContext()
Deprecated. 
Return the context map

Returns:

setContext

public void setContext(java.lang.String key,
                       java.lang.String value)
Deprecated. 
Set a context data value to be used by the Reformatter

Parameters:
key -
value -

getOriginalSink

public java.io.OutputStream getOriginalSink()
Deprecated. 
Return original OutputStream sink

Returns:
original sink