com.android.ddmlib.log
Class LogReceiver

java.lang.Object
  extended by 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
static interface LogReceiver.ILogListener
          Classes which implement this interface provide a method that deals with LogReceiver.LogEntry objects coming from log service through a LogReceiver.
static class LogReceiver.LogEntry
          Represents a log entry and its raw data.
 
Constructor Summary
LogReceiver(LogReceiver.ILogListener listener)
          Creates a LogReceiver with an LogReceiver.ILogListener.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogReceiver

public LogReceiver(LogReceiver.ILogListener listener)
Creates a LogReceiver with an LogReceiver.ILogListener.

The LogReceiver.ILogListener will receive new log entries as they are parsed, in the form of LogReceiver.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 buffer
offset - 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.