SparseImageUtil.SparseInputStream

public static class SparseImageUtil.SparseInputStream
extends Object

java.lang.Object
com.android.tradefed.util.SparseImageUtil.SparseInputStream


SparseInputStream 從上游讀取並偵測資料格式。如果上游是有效的稀疏數據,它將即時解稀疏。否則,它只是按原樣通過。

概括

公共構造函數

SparseInputStream (BufferedInputStream in, long originalSize)

公共方法

void close ()
boolean isSparse ()
int read (byte[] buf, int off, int len)
int read ()
long size ()

傳回未稀疏影像中的總位元組數。

公共構造函數

稀疏輸入流

public SparseInputStream (BufferedInputStream in, 
                long originalSize)

參數
in BufferedInputStream

originalSize long

公共方法

關閉

public void close ()

稀疏

public boolean isSparse ()

退貨
boolean

public int read (byte[] buf, 
                int off, 
                int len)

參數
buf byte

off int

len int

退貨
int

public int read ()

退貨
int

尺寸

public long size ()

傳回未稀疏影像中的總位元組數。

退貨
long mOriginalSize 如果底層流已經是非稀疏的。