Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStreamReader;

public class Main {
    public static String getLogcat() {
        String output = "";
        try {
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(
                    Runtime.getRuntime().exec("logcat -v -d time IconThemer *:S").getInputStream()));
            while (true) {
                String line = bufferedReader.readLine();
                if (line == null) {
                    break;
                }
                output = output + line;
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return output;
    }
}