Package com.android.ddmlib.log
Class LogReceiver
- java.lang.Object
-
- com.android.ddmlib.log.LogReceiver
-
public final class LogReceiver extends java.lang.Object
Receiver able to provide low level parsing for device-side log services.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LogReceiver.ILogListener
Classes which implement this interface provide a method that deals withLogReceiver.LogEntry
objects coming from log service through aLogReceiver
.static class
LogReceiver.LogEntry
Represents a log entry and its raw data.
-
Constructor Summary
Constructors Constructor Description LogReceiver(LogReceiver.ILogListener listener)
Creates aLogReceiver
with anLogReceiver.ILogListener
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancels the current remote service.boolean
isCancelled()
Returns whether this receiver is canceling the remote service.void
parseNewData(byte[] data, int offset, int length)
Parses new data coming from the log service.
-
-
-
Constructor Detail
-
LogReceiver
public LogReceiver(LogReceiver.ILogListener listener)
Creates aLogReceiver
with anLogReceiver.ILogListener
.The
LogReceiver.ILogListener
will receive new log entries as they are parsed, in the form ofLogReceiver.LogEntry
objects.- Parameters:
listener
- the listener to receive new log entries.
-
-
Method Detail
-
parseNewData
public void parseNewData(byte[] data, int offset, int length)
Parses new data coming from the log service.- Parameters:
data
- the data bufferoffset
- the offset into the buffer signaling the beginning of the new data.length
- the length of the new data.
-
isCancelled
public boolean isCancelled()
Returns whether this receiver is canceling the remote service.
-
cancel
public void cancel()
Cancels the current remote service.
-
-