public String input ( String message ) throws IOException , UserCancelExcption { Map < String , Object > m = JSONProtocol . cmd ( "input" ) ; m . put ( "text" , message ) ; pipe . send ( m ) ; Map < String , Object > r = pipe . recv ( ) ; if ( ! JSONProtocol . check ( m , r ) || ! r . containsKey ( "value" ) ) { throw new IOException ( "No value" ) ; } return ( String ) r . get ( "value" ) ; }
Asks for input from the user .