Class Output

java.lang.Object
java.io.OutputStream
com.ibm.jvm.dtfjview.Output
All Implemented Interfaces:
IOutputChannel, IOutputManager, Closeable, Flushable, AutoCloseable

public class Output extends OutputStream implements IOutputManager
  • Constructor Details

    • Output

      public Output()
  • Method Details

    • clearBuffer

      public void clearBuffer()
      Description copied from interface: IOutputManager
      Clears the current buffer contents.
      Specified by:
      clearBuffer in interface IOutputManager
    • setBuffering

      public void setBuffering(boolean enabled)
      Description copied from interface: IOutputManager
      Enabling buffering will cause the output from commands to be written to an internal buffer rather than immediately to the underlying output channels. This is typically used by clients to inspect or intercept the results from a command before carrying out further processing. By default buffering is not enabled.
      Specified by:
      setBuffering in interface IOutputManager
      Parameters:
      enabled - true turns on buffering
    • getBuffer

      public String getBuffer()
      Description copied from interface: IOutputManager
      Gets the current buffer contents.
      Specified by:
      getBuffer in interface IOutputManager
      Returns:
      buffer contents
    • print

      public void print(String outputString)
      Description copied from interface: IOutputChannel
      Sends text to channel
      Specified by:
      print in interface IOutputChannel
      Parameters:
      outputString - text to send
    • printPrompt

      public void printPrompt(String prompt)
      Description copied from interface: IOutputChannel
      Sets the prompt which should be displayed when an interactive session is running. Typically this will display the context number in a multi-context environment.
      Specified by:
      printPrompt in interface IOutputChannel
      Parameters:
      prompt - prompt to display.
    • println

      public void println(String outputString)
      Description copied from interface: IOutputChannel
      Sends text to the channel with an appended \n
      Specified by:
      println in interface IOutputChannel
      Parameters:
      outputString - text to send
    • addChannel

      public void addChannel(IOutputChannel channel)
      Description copied from interface: IOutputManager
      Adds a channel to the list of registered channels.
      Specified by:
      addChannel in interface IOutputManager
      Parameters:
      channel - channel to add.
    • addChannel

      public void addChannel(IOutputChannel channel, boolean printLastInput)
    • removeChannel

      public void removeChannel(Class<?> type)
      Description copied from interface: IOutputManager
      Removes all registered channels for a particular type.
      Specified by:
      removeChannel in interface IOutputManager
    • removeChannel

      public void removeChannel(IOutputChannel channel)
      Description copied from interface: IOutputManager
      Removes a specific channel for a particular type. For this to be successful the underlying implementation must override hashcode and equals.
      Specified by:
      removeChannel in interface IOutputManager
    • removeAllChannels

      public void removeAllChannels()
      Description copied from interface: IOutputManager
      Remove all registered channels
      Specified by:
      removeAllChannels in interface IOutputManager
    • removeFileChannel

      public void removeFileChannel()
    • setConsoleNoPrint

      public void setConsoleNoPrint(boolean noPrint)
    • close

      public void close()
      Description copied from class: java.io.OutputStream
      Closes this output stream and releases any system resources associated with this stream. The general contract of close is that it closes the output stream. A closed stream cannot perform output operations and cannot be reopened.

      The close method of OutputStream does nothing.

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface IOutputChannel
      Overrides:
      close in class OutputStream
    • write

      public void write(int b) throws IOException
      Description copied from class: java.io.OutputStream
      Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

      Subclasses of OutputStream must provide an implementation for this method.

      Specified by:
      write in class OutputStream
      Parameters:
      b - the byte.
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
    • flush

      public void flush()
      Description copied from class: java.io.OutputStream
      Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.

      If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.

      The flush method of OutputStream does nothing.

      Specified by:
      flush in interface Flushable
      Specified by:
      flush in interface IOutputChannel
      Overrides:
      flush in class OutputStream
    • getPrintStream

      public PrintStream getPrintStream()
      Description copied from interface: IOutputManager
      Creates a print stream for this output object
      Specified by:
      getPrintStream in interface IOutputManager
      Returns: