Тема: Телефония
Показать сообщение отдельно
Старый 19.10.2014, 21:52   #12
RegIon
Элита
 
Аватар для RegIon
 
Регистрация: 16.01.2010
Адрес: Новосибирск
Сообщений: 2,157
Написано 502 полезных сообщений
(для 1,012 пользователей)
Ответ: Телефония

А лучше Integer.parseInt(), не просто же ее придумали:
int len st.length();
int[] data = new int[len];
for(
int n 0lenn++)
{
data[n] = Integer.parseIntst.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(buffer0read);
    }
    
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);

__________________
Сайт: http://iexpo.ml
(Offline)
 
Ответить с цитированием
Сообщение было полезно следующим пользователям:
S_007 (20.10.2014)