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

BugReportImporter

public class BugReportImporter extends Object

Fields Summary
private static final String
TAG_HEADER
private static final String
LOG_HEADER
private static final String
HEADER_TAG
private String[]
mTags
private String[]
mLog
Constructors Summary
public BugReportImporter(String filePath)

    
         
        BufferedReader reader = new BufferedReader(
                new InputStreamReader(new FileInputStream(filePath)));

        try {
            String line;
            while ((line = reader.readLine()) != null) {
                if (TAG_HEADER.equals(line)) {
                    readTags(reader);
                    return;
                }
            }
        } 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) {
            if (line.startsWith(HEADER_TAG) == false) {
                content.add(line);
            } else {
                break;
            }
        }
        
        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) {
            if (LOG_HEADER.equals(line)) {
                mTags = content.toArray(new String[content.size()]);
                readLog(reader);
                return;
            } else {
                content.add(line);
            }
        }