Package com.android.ddmlib.log
Class EventLogParser
- java.lang.Object
-
- com.android.ddmlib.log.EventLogParser
-
public final class EventLogParser extends java.lang.Object
Parser for the "event" log.
-
-
Constructor Summary
Constructors Constructor Description EventLogParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.Integer,EventValueDescription[]>
getEventInfoMap()
java.util.Map<java.lang.Integer,java.lang.String>
getTagMap()
boolean
init(IDevice device)
Inits the parser for a specific Device.boolean
init(java.lang.String filePath)
Inits the parser with a specified event-log-tags file.boolean
init(java.lang.String[] tagFileContent)
Inits the parser with the content of a tag file.EventContainer
parse(LogReceiver.LogEntry entry)
EventContainer
parse(java.lang.String textLogLine)
void
saveTags(java.lang.String filePath)
Recreates the event-log-tags at the specified file path.
-
-
-
Method Detail
-
init
public boolean init(IDevice device)
Inits the parser for a specific Device.This methods reads the event-log-tags located on the device to find out what tags are being written to the event log and what their format is.
- Parameters:
device
- The device.- Returns:
true
if success,false
if failure or cancellation.
-
init
public boolean init(java.lang.String[] tagFileContent)
Inits the parser with the content of a tag file.- Parameters:
tagFileContent
- the lines of a tag file.- Returns:
true
if success,false
if failure.
-
init
public boolean init(java.lang.String filePath)
Inits the parser with a specified event-log-tags file.- Parameters:
filePath
-- Returns:
true
if success,false
if failure.
-
parse
public EventContainer parse(LogReceiver.LogEntry entry)
-
parse
public EventContainer parse(java.lang.String textLogLine)
-
getTagMap
public java.util.Map<java.lang.Integer,java.lang.String> getTagMap()
-
getEventInfoMap
public java.util.Map<java.lang.Integer,EventValueDescription[]> getEventInfoMap()
-
saveTags
public void saveTags(java.lang.String filePath) throws java.io.IOException
Recreates the event-log-tags at the specified file path.- Parameters:
filePath
- the file path to write the file.- Throws:
java.io.IOException
-
-