ShellOutputReceiverStream

public final class ShellOutputReceiverStream
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.ShellOutputReceiverStream


Lớp con tiện ích của OutputStream ghi vào IShellOutputReceiver.

Tóm tắt

Hàm khởi tạo công khai

ShellOutputReceiverStream(IShellOutputReceiver receiver)

Tạo một trình chuyển đổi mới cho IShellOutputReceiver đã cho.

ShellOutputReceiverStream(IShellOutputReceiver receiver, FileOutputStream fileOutput)

Phương thức công khai

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

Hàm khởi tạo công khai

ShellOutputReceiverStream

public ShellOutputReceiverStream (IShellOutputReceiver receiver)

Tạo một trình chuyển đổi mới cho IShellOutputReceiver đã cho.

Bạn có thể cung cấp một bộ nhận rỗng ở đây để đơn giản hoá mã bằng cách sử dụng bộ chuyển đổi, tức là để mã có thể sử dụng bộ nhận này với try-with-resources mà không cần tự kiểm tra bộ nhận rỗng.

Tham số
receiver IShellOutputReceiver

ShellOutputReceiverStream

public ShellOutputReceiverStream (IShellOutputReceiver receiver, 
                FileOutputStream fileOutput)

Tham số
receiver IShellOutputReceiver

fileOutput FileOutputStream

Phương thức công khai

đóng

public void close ()

flush

public void flush ()

viết

public void write (byte[] b)

Tham số
b byte

viết

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

Tham số
b byte

off int

len int

viết

public void write (int b)

Tham số
b int