Package edu.uiuc.ncsa.security.util.cli
Interface IOInterface
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearQueue()Some implementations will have a queue e.g.voidflush()Flush anything waiting to be printed.booleanisBufferingOn()return current state of buffering.booleanisQueueEmpty()Check if the queue is empty.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 bufferOn)If this object supports buffering of commands, this will toggle it.
 
- 
- 
- 
Method Detail- 
readlineString readline(String prompt) throws IOException read a line of input, printing the prompt (on the left) first. The prompt is not returned.- Parameters:
- prompt-
- Returns:
- Throws:
- IOException
 
 - 
readlineString readline() throws IOException Read a line of input with no prompt.- Returns:
- Throws:
- IOException
 
 - 
printvoid print(Object x) Print the string representation of an object, without a carriage return.- Parameters:
- x-
 
 - 
printlnvoid println(Object x) Print the string representation of an object with a carriage return.- Parameters:
- x-
 
 - 
flushvoid flush() Flush anything waiting to be printed. Normally this is done with the print methods.
 - 
clearQueuevoid clearQueue() Some implementations will have a queue e.g. if the user paste text from the clipboard). Thereadline(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.
 - 
isQueueEmptyboolean isQueueEmpty() Check if the queue is empty.- Returns:
 
 - 
setBufferingOnvoid setBufferingOn(boolean bufferOn) If this object supports buffering of commands, this will toggle it. Buffering means that every result ofreadline(String)will be stored and up down arrows will cycle through them.- Parameters:
- bufferOn-
 
 - 
isBufferingOnboolean isBufferingOn() return current state of buffering.- Returns:
 
 
- 
 
-