日期:2014-05-19 浏览次数:20654 次
public class InputstreamReadrDemo {
public static void main(String[] args) throws IOException {
InputStreamReader isr = new InputStreamReader(System.in);
int x;
while((x=isr.read())!=-1){
System.out.print(x);
}
isr.close();
}
}
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);//缓冲
String line = null;
while (!(line = br.readLine()).equals("quit")) {
System.out.print(line);
}
isr.close();