CollectingOutputReceiver

public class CollectingOutputReceiver
extends Object implements IShellOutputReceiver

java.lang.Object
   ↳ com.android.ddmlib.CollectingOutputReceiver


IShellOutputReceiver שאוסף את כל הפלט של המעטפת לתוך String אחד.

סיכום

‫constructors ציבוריים

CollectingOutputReceiver()
CollectingOutputReceiver(CountDownLatch commandCompleteLatch)

‫methods ציבוריים

void addOutput(byte[] data, int offset, int length)

הפונקציה נקראת בכל פעם שיש נתונים חדשים.

boolean awaitCompletion(long timeout, TimeUnit unit)
void cancel()

ביטול אוסף הפלט.

void flush()

הפונקציה מופעלת בסיום ההרצה של התהליך (אלא אם התהליך בוטל).

String getOutput()
boolean isCancelled()

שיטת ביטול להפסקת הביצוע של פקודת ה-Shell המרוחקת.

boolean isComplete()

Constructors ציבוריים

CollectingOutputReceiver

public CollectingOutputReceiver ()

CollectingOutputReceiver

public CollectingOutputReceiver (CountDownLatch commandCompleteLatch)

פרמטרים
commandCompleteLatch CountDownLatch

‫methods ציבוריים

addOutput

public void addOutput (byte[] data, 
                int offset, 
                int length)

הפונקציה נקראת בכל פעם שיש נתונים חדשים.

פרמטרים
data byte: הנתונים החדשים.

offset int: ההיסט שבו מתחילים הנתונים החדשים.

length int: אורך הנתונים החדשים.

awaitCompletion

public boolean awaitCompletion (long timeout, 
                TimeUnit unit)

פרמטרים
timeout long

unit TimeUnit

החזרות
boolean

ביטול

public void cancel ()

ביטול אוסף הפלט.

ישירה

public void flush ()

הפונקציה מופעלת בסיום ההרצה של התהליך (אלא אם התהליך בוטל). כך המקבל יכול לסיים את הפעולה ולנקות את כל הנתונים שעוד לא עברו עיבוד.

getOutput

public String getOutput ()

החזרות
String

isCancelled

public boolean isCancelled ()

שיטת ביטול להפסקת הביצוע של פקודת ה-Shell המרוחקת.

החזרות
boolean ‫true כדי לבטל את ההרצה של הפקודה.

isComplete

public boolean isComplete ()

החזרות
boolean