SparseImageUtil.SparseInputStream

public static class SparseImageUtil.SparseInputStream
extends InputStream

java.lang.Object
   ↳ java.io.InputStream
     ↳ com.android.tradefed.util.SparseImageUtil.SparseInputStream


SparseInputStream 會從上游讀取資料,並偵測資料格式。如果上游是有效的稀疏資料,系統會即時取消稀疏化。否則,系統會直接傳遞。

摘要

公用建構函式

SparseInputStream(BufferedInputStream in, long originalSize)

公用方法

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

傳回未稀疏化圖片中的位元組總數。

公用建構函式

SparseInputStream

public SparseInputStream (BufferedInputStream in, 
                long originalSize)

參數
in BufferedInputStream

originalSize long

擲回
IOException

公用方法

關閉

public void close ()

擲回
IOException

isSparse

public boolean isSparse ()

傳回
boolean

讀取

public int read ()

傳回
int

擲回
IOException

讀取

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

參數
buf byte

off int

len int

傳回
int

擲回
IOException

大小

public long size ()

傳回未稀疏化圖片中的位元組總數。

傳回
long 如果基礎串流已非稀疏,則為 mOriginalSize。