package com.kk.array;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
public class RunTimeTest {
public static void main(String[] args) {
try {
Process process =Runtime.getRuntime().exec("ping www.baidu.com");
InputStream in=process.getInputStream();
InputStreamReader sr=new InputStreamReader(new BufferedInputStream(in));
int data;
while((data=sr.read())!=-1)
System.out.print((char)data);
} catch (IOException e) {
e.printStackTrace();
}
}
}