java.lang.Object
java.io.OutputStream
com.ibm.jvm.dtfjview.Output
- All Implemented Interfaces:
IOutputChannel,IOutputManager,Closeable,Flushable,AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChannel(IOutputChannel channel) Adds a channel to the list of registered channels.voidaddChannel(IOutputChannel channel, boolean printLastInput) voidClears the current buffer contents.voidclose()Closes this output stream and releases any system resources associated with this stream.voidflush()Flushes this output stream and forces any buffered output bytes to be written out.Gets the current buffer contents.Creates a print stream for this output objectvoidSends text to channelvoidSends text to the channel with an appended \nvoidprintPrompt(String prompt) Sets the prompt which should be displayed when an interactive session is running.voidRemove all registered channelsvoidremoveChannel(IOutputChannel channel) Removes a specific channel for a particular type.voidremoveChannel(Class<?> type) Removes all registered channels for a particular type.voidvoidsetBuffering(boolean enabled) Enabling buffering will cause the output from commands to be written to an internal buffer rather than immediately to the underlying output channels.voidsetConsoleNoPrint(boolean noPrint) voidwrite(int b) Writes the specified byte to this output stream.Methods declared in class java.io.OutputStream
nullOutputStream, write, write
-
Constructor Details
-
Output
public Output()
-
-
Method Details
-
clearBuffer
public void clearBuffer()Description copied from interface:IOutputManagerClears the current buffer contents.- Specified by:
clearBufferin interfaceIOutputManager
-
setBuffering
public void setBuffering(boolean enabled) Description copied from interface:IOutputManagerEnabling 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:
setBufferingin interfaceIOutputManager- Parameters:
enabled- true turns on buffering
-
getBuffer
Description copied from interface:IOutputManagerGets the current buffer contents.- Specified by:
getBufferin interfaceIOutputManager- Returns:
- buffer contents
-
print
Description copied from interface:IOutputChannelSends text to channel- Specified by:
printin interfaceIOutputChannel- Parameters:
outputString- text to send
-
printPrompt
Description copied from interface:IOutputChannelSets 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:
printPromptin interfaceIOutputChannel- Parameters:
prompt- prompt to display.
-
println
Description copied from interface:IOutputChannelSends text to the channel with an appended \n- Specified by:
printlnin interfaceIOutputChannel- Parameters:
outputString- text to send
-
addChannel
Description copied from interface:IOutputManagerAdds a channel to the list of registered channels.- Specified by:
addChannelin interfaceIOutputManager- Parameters:
channel- channel to add.
-
addChannel
-
removeChannel
Description copied from interface:IOutputManagerRemoves all registered channels for a particular type.- Specified by:
removeChannelin interfaceIOutputManager- Parameters:
type-
-
removeChannel
Description copied from interface:IOutputManagerRemoves a specific channel for a particular type. For this to be successful the underlying implementation must override hashcode and equals.- Specified by:
removeChannelin interfaceIOutputManager
-
removeAllChannels
public void removeAllChannels()Description copied from interface:IOutputManagerRemove all registered channels- Specified by:
removeAllChannelsin interfaceIOutputManager
-
removeFileChannel
public void removeFileChannel() -
setConsoleNoPrint
public void setConsoleNoPrint(boolean noPrint) -
close
public void close()Description copied from class:java.io.OutputStreamCloses this output stream and releases any system resources associated with this stream. The general contract ofcloseis that it closes the output stream. A closed stream cannot perform output operations and cannot be reopened.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceIOutputChannel- Overrides:
closein classOutputStream
-
write
Description copied from class:java.io.OutputStreamWrites the specified byte to this output stream. The general contract forwriteis that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argumentb. The 24 high-order bits ofbare ignored.- Specified by:
writein classOutputStream- Parameters:
b- thebyte.- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the output stream has been closed.
-
flush
public void flush()Description copied from class:java.io.OutputStreamFlushes this output stream and forces any buffered output bytes to be written out. The general contract offlushis 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.
- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceIOutputChannel- Overrides:
flushin classOutputStream
-
getPrintStream
Description copied from interface:IOutputManagerCreates a print stream for this output object- Specified by:
getPrintStreamin interfaceIOutputManager- Returns:
-