А лучше Integer.parseInt(), не просто же ее придумали:
int len = st.length();
int[] data = new int[len];
for(int n = 0; n < len; n++)
{
data[n] = Integer.parseInt( st.charAt(n) );
}
Как-то так можно
try {
// Executes the command.
Process process = Runtime.getRuntime().exec("/system/bin/logcat -v time -b radio GSM:D *:S");
// Reads stdout.
// NOTE: You can write to stdin of the command
// process.getOutputStream().
BufferedReader reader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
int read;
char[] buffer = new char[4096];
StringBuffer output = new StringBuffer();
while ((read = reader.read(buffer)) > 0) {
output.append(buffer, 0, read);
}
reader.close();
// Waits for the command to finish.
process.waitFor();
return output.toString();
} catch (IOException e) {
throw new RuntimeException(e);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}