code: public static BufferedReader getNbReader(BufferedReader reader, int tries, int timeout, HasPrompt emptyPrint){
  		if(reader==null){
  			return null;
  		}
  		return new BufferedReader(reader){
  			ExecutorService ex = Executors.newSingleThreadExecutor();
  			@Override
  			public String readLine(){
  				String input = null;
  				try {
  					for(int i=0; i<tries; i++) {
  						Future<String> result = ex.submit(NonBlockingReader.getCallWTimeout(reader, emptyPrint));
  						try {
  							input = result.get(timeout, TimeUnit.MILLISECONDS);
  							break;
  						}
  						catch(ExecutionException ignore) {}
  						catch(TimeoutException e) {
  							result.cancel(true);
  						}
  						catch(InterruptedException ignore) {
  							ex.shutdownNow();
  						}
  					}
  				}
  				finally {
  					//ex.shutdownNow();
  				}
  				return input;
  			}
  		};
  	}
docs: Returns a new BufferedReader that uses tries and timeout for readline().
  @param reader original reader to extend, use in combination with {@link MessageConsole#getStdIn(String)} for standard in
  @param tries number of tries for read calls, use one as default
  @param timeout milliseconds for read timeout
  @param emptyPrint a printout to realize on an empty readline string, for prompts, set null if not required
  @return new reader with parameterized readline() method