字節數組輸入流源

public class ByteArrayInputStreamSource
extends Object implements InputStreamSource

java.lang.Object
com.android.tradefed.result.ByteArrayInputStreamSource


概括

公共構造函數

ByteArrayInputStreamSource (byte[] array)

公共方法

void close ()

對 InputStream 的源進行任何必要的清理。

InputStream createInputStream ()

返回ERROR(/InputStream)的新克隆,以便調用者可以從頭讀取流。

long size ()

返回源數據的字節大小。

公共構造函數

字節數組輸入流源

public ByteArrayInputStreamSource (byte[] array)

參數
array byte

公共方法

關閉

public void close ()

對 InputStream 的源進行任何必要的清理。調用此方法實質上會使此InputStreamSource無效。

創建輸入流

public InputStream createInputStream ()

返回ERROR(/InputStream)的新克隆,以便調用者可以從頭讀取流。每次調用此方法(直到調用cancel() )都將返回一個行為相同的ERROR(/InputStream) ——將返回相同的內容。

退貨
InputStream一個ERROR(/InputStream) ,調用者可以使用它從頭開始讀取數據源。如果此InputStreamSource已因先前對cancel()的調用而失效,或者如果由於某些其他原因無法創建新的 InputStream,則可能返回null

尺寸

public long size ()

返回源數據的字節大小。

退貨
long