ShellOutputReceiverStream

public final class ShellOutputReceiverStream
extends OutputStream

java.lang.Object
java.io.OutputStream
  com.android.tradefed.util.ShellOutputReceiverStream


คลาสย่อยของ OutputStream ที่เขียนลงใน IShellOutputReceiver

สรุป

เครื่องมือสร้างสาธารณะ

ShellOutputReceiverStream(IShellOutputReceiver receiver)

สร้างอะแดปเตอร์ใหม่สำหรับ IShellOutputReceiver ที่ระบุ

ShellOutputReceiverStream(IShellOutputReceiver receiver, FileOutputStream fileOutput)

เมธอดสาธารณะ

void close()
void flush()
void write(byte[] b)
void write(byte[] b, int off, int len)
void write(int b)

เครื่องมือสร้างสาธารณะ

ShellOutputReceiverStream

public ShellOutputReceiverStream (IShellOutputReceiver receiver)

สร้างอะแดปเตอร์ใหม่สำหรับ IShellOutputReceiver ที่ระบุ

คุณสามารถระบุตัวรับสัญญาณเป็น null ได้ที่นี่เพื่อลดความซับซ้อนของโค้ดที่ใช้อะแดปเตอร์ เช่น เพื่ อให้โค้ดใช้อะแดปเตอร์กับ try-with-resources ได้โดยไม่ต้องตรวจสอบตัวรับสัญญาณเป็น null ด้วยตนเอง

พารามิเตอร์
receiver IShellOutputReceiver

ShellOutputReceiverStream

public ShellOutputReceiverStream (IShellOutputReceiver receiver, 
                FileOutputStream fileOutput)

พารามิเตอร์
receiver IShellOutputReceiver

fileOutput FileOutputStream

เมธอดสาธารณะ

ปิด

public void close ()

ส่ง
IOException

โอนข้อมูล

public void flush ()

ส่ง
IOException

เขียน

public void write (byte[] b)

พารามิเตอร์
b byte

เขียน

public void write (byte[] b, 
                int off, 
                int len)

พารามิเตอร์
b byte

off int

len int

เขียน

public void write (int b)

พารามิเตอร์
b int