peersim.rangesim
Class TaggedOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by peersim.rangesim.TaggedOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

public class TaggedOutputStream
extends java.io.PrintStream

This OutputStream uses an underlying stream to output data. Each line (terminated with `\n`) is augmented with a tag character. This is used to discriminate among standard error and standard output. This feature is needed for launching new JVMs; it should not be used for other purposes.


Parameter Summary
ranges
          This parameter contains the string that should be printed on each line, containing the values of the range parameters for the experiment which is being run.
simulation.timed-observers
          This parameter contains the list of observers for which the string contained in parameter "ranges" should be augmented with a "TIME <t>" specification regarding current time.
 
Field Summary
static int TAG
          This character is appended at the end of each line.
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
TaggedOutputStream(java.lang.String prefix)
          Creates a tagged output stream that prints the tagged output on the specified stream.
 
Method Summary
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.PrintStream
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

ranges

This parameter contains the string that should be printed on each line, containing the values of the range parameters for the experiment which is being run. The full name of this configuration string is prefixed by "simulation.stdout".


simulation.timed-observers

This parameter contains the list of observers for which the string contained in parameter "ranges" should be augmented with a "TIME <t>" specification regarding current time. Observers are separated by one of this characters: ' ' - ',' - ';'.

Field Detail

TAG

public static final int TAG
This character is appended at the end of each line.

See Also:
Constant Field Values
Constructor Detail

TaggedOutputStream

public TaggedOutputStream(java.lang.String prefix)
Creates a tagged output stream that prints the tagged output on the specified stream.

Method Detail

write

public void write(byte[] b,
                  int off,
                  int len)
Overrides:
write in class java.io.PrintStream

write

public void write(int b)
Overrides:
write in class java.io.PrintStream