public
static
class
SparseImageUtil.SparseInputStream
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.util.SparseImageUtil.SparseInputStream
|
SparseInputStream read from upstream and detects the data format. If the upstream is a valid
sparse data, it will unsparse it on the fly. Otherwise, it just passthrough as is.
Summary
Public methods |
void
|
close()
|
boolean
|
isSparse()
|
int
|
read(byte[] buf, int off, int len)
|
int
|
read()
|
long
|
size()
Return the total number of bytes in the unsparsed image.
|
Public constructors
public SparseInputStream (BufferedInputStream in,
long originalSize)
Parameters |
in |
BufferedInputStream |
originalSize |
long |
Public methods
close
public void close ()
isSparse
public boolean isSparse ()
read
public int read (byte[] buf,
int off,
int len)
Parameters |
buf |
byte |
off |
int |
len |
int |
size
public long size ()
Return the total number of bytes in the unsparsed image.
Returns |
long |
mOriginalSize if underlying stream is already non-sparse. |