标签:
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; while ((str = br.readLine()) != null) { List<String> resultList = executeLinuxCommand(str); for (String result : resultList) { LOGGER.info(result); } } }
键盘输入是字节流,转化为字符流,再调用装饰的readLine方法
标签:
原文地址:http://www.cnblogs.com/balfish/p/4472225.html