FileDocCategorySizeDatePackage
EventLogImporter.javaAPI DocAndroid 1.5 API2471Wed May 06 22:41:08 BST 2009com.android.ddmuilib.log.event

EventLogImporter

public class EventLogImporter extends Object
Imports a textual event log. Gets tags from build path.

Fields Summary
private String[]
mTags
private String[]
mLog
Constructors Summary
public EventLogImporter(String filePath)

        String top = System.getenv("ANDROID_BUILD_TOP");
        if (top == null) {
            throw new FileNotFoundException();
        }
        final String tagFile = top + "/system/core/logcat/event-log-tags";
        BufferedReader tagReader = new BufferedReader(
                new InputStreamReader(new FileInputStream(tagFile)));
        BufferedReader eventReader = new BufferedReader(
                new InputStreamReader(new FileInputStream(filePath)));
        try {
            readTags(tagReader);
            readLog(eventReader);
        } catch (IOException e) {
        }
    
Methods Summary
public java.lang.String[]getLog()

        return mLog;
    
public java.lang.String[]getTags()

        return mTags;
    
private voidreadLog(java.io.BufferedReader reader)

        String line;

        ArrayList<String> content = new ArrayList<String>();
        while ((line = reader.readLine()) != null) {
            content.add(line);
        }

        mLog = content.toArray(new String[content.size()]);
    
private voidreadTags(java.io.BufferedReader reader)

        String line;

        ArrayList<String> content = new ArrayList<String>();
        while ((line = reader.readLine()) != null) {
            content.add(line);
        }
        mTags = content.toArray(new String[content.size()]);