Class ISO6429IO
- java.lang.Object
- 
- edu.uiuc.ncsa.security.util.terminal.ISO6429IO
 
- 
- All Implemented Interfaces:
- IOInterface
 
 public class ISO6429IO extends Object implements IOInterface ISO 6429 (cursor addressing spec) compliant implementation of theIOInterface. This has a basic command line history accessible with up and down arrows.Created by Jeff Gaynor 
 on 6/9/20 at 7:52 AM
- 
- 
Constructor SummaryConstructors Constructor Description ISO6429IO(boolean noBanner)ISO6429IO(MyLoggingFacade loggingFacade, boolean noBanner)ISO6429IO(ISO6429Terminal terminal, boolean noBanner)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCommandHistory(List<String> commands)voidclearCommandBuffer()voidclearQueue()Some implementations will have a queue e.g.protected voiddebug(String x)voidflush()Flush anything waiting to be printed.ArrayList<String>getCommandCompletion()MyLoggingFacadegetLoggingFacade()int[]getScreenSize()ISO6429TerminalgetTerminal()protected voidinfo(String x)protected voidinit(boolean noBanner)booleanisBufferingOn()return current state of buffering.booleanisQueueEmpty()Check if the queue is empty.static voidmain(String[] args)voidprint(Object x)Print the string representation of an object, without a carriage return.voidprintln(Object x)Print the string representation of an object with a carriage return.Stringreadline()Read a line of input with no prompt.Stringreadline(String prompt)read a line of input, printing the prompt (on the left) first.voidsetBufferingOn(boolean bufferingOn)If this object supports buffering of commands, this will toggle it.voidsetCommandCompletion(ArrayList<String> commandCompletion)voidsetLoggingFacade(MyLoggingFacade loggingFacade)protected voidwarn(String x, Throwable t)
 
- 
- 
- 
Constructor Detail- 
ISO6429IOpublic ISO6429IO(MyLoggingFacade loggingFacade, boolean noBanner) throws IOException - Throws:
- IOException
 
 - 
ISO6429IOpublic ISO6429IO(ISO6429Terminal terminal, boolean noBanner) throws IOException - Throws:
- IOException
 
 - 
ISO6429IOpublic ISO6429IO(boolean noBanner) throws IOException- Throws:
- IOException
 
 
- 
 - 
Method Detail- 
getLoggingFacadepublic MyLoggingFacade getLoggingFacade() 
 - 
setLoggingFacadepublic void setLoggingFacade(MyLoggingFacade loggingFacade) 
 - 
clearCommandBufferpublic void clearCommandBuffer() 
 - 
readlinepublic String readline() throws IOException Description copied from interface:IOInterfaceRead a line of input with no prompt.- Specified by:
- readlinein interface- IOInterface
- Returns:
- Throws:
- IOException
 
 - 
readlinepublic String readline(String prompt) throws IOException Description copied from interface:IOInterfaceread a line of input, printing the prompt (on the left) first. The prompt is not returned.- Specified by:
- readlinein interface- IOInterface
- Returns:
- Throws:
- IOException
 
 - 
getTerminalpublic ISO6429Terminal getTerminal() throws IOException - Throws:
- IOException
 
 - 
printpublic void print(Object x) Description copied from interface:IOInterfacePrint the string representation of an object, without a carriage return.- Specified by:
- printin interface- IOInterface
 
 - 
printlnpublic void println(Object x) Description copied from interface:IOInterfacePrint the string representation of an object with a carriage return.- Specified by:
- printlnin interface- IOInterface
 
 - 
flushpublic void flush() Description copied from interface:IOInterfaceFlush anything waiting to be printed. Normally this is done with the print methods.- Specified by:
- flushin interface- IOInterface
 
 - 
initprotected void init(boolean noBanner) throws IOException- Throws:
- IOException
 
 - 
getScreenSizepublic int[] getScreenSize() throws IOException- Throws:
- IOException
 
 - 
mainpublic static void main(String[] args) 
 - 
infoprotected void info(String x) 
 - 
debugprotected void debug(String x) 
 - 
clearQueuepublic void clearQueue() Description copied from interface:IOInterfaceSome implementations will have a queue e.g. if the user paste text from the clipboard). TheIOInterface.readline(String)methods will queue these up and return them in sequence -- this is done silently. If for some reason you need only a single line and want to discard anything else, invoke this.- Specified by:
- clearQueuein interface- IOInterface
 
 - 
isQueueEmptypublic boolean isQueueEmpty() Description copied from interface:IOInterfaceCheck if the queue is empty.- Specified by:
- isQueueEmptyin interface- IOInterface
- Returns:
 
 - 
setBufferingOnpublic void setBufferingOn(boolean bufferingOn) Description copied from interface:IOInterfaceIf this object supports buffering of commands, this will toggle it. Buffering means that every result ofIOInterface.readline(String)will be stored and up down arrows will cycle through them.- Specified by:
- setBufferingOnin interface- IOInterface
 
 - 
isBufferingOnpublic boolean isBufferingOn() Description copied from interface:IOInterfacereturn current state of buffering.- Specified by:
- isBufferingOnin interface- IOInterface
- Returns:
 
 
- 
 
-