FileDocCategorySizeDatePackage
ImageDescriptor.javaAPI DocAndroid 5.1 API2380Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony.cat

ImageDescriptor

public class ImageDescriptor extends Object
{@hide}

Fields Summary
int
mWidth
int
mHeight
int
mCodingScheme
int
mImageId
int
mHighOffset
int
mLowOffset
int
mLength
static final int
CODING_SCHEME_BASIC
static final int
CODING_SCHEME_COLOUR
Constructors Summary
ImageDescriptor()


    // public static final int ID_LENGTH = 9;
    // ID_LENGTH substituted by IccFileHandlerBase.GET_RESPONSE_EF_IMG_SIZE_BYTES

     
        mWidth = 0;
        mHeight = 0;
        mCodingScheme = 0;
        mImageId = 0;
        mHighOffset = 0;
        mLowOffset = 0;
        mLength = 0;
    
Methods Summary
static com.android.internal.telephony.cat.ImageDescriptorparse(byte[] rawData, int valueIndex)
Extract descriptor information about image instance.

param
rawData
param
valueIndex
return
ImageDescriptor

        ImageDescriptor d = new ImageDescriptor();
        try {
            d.mWidth = rawData[valueIndex++] & 0xff;
            d.mHeight = rawData[valueIndex++] & 0xff;
            d.mCodingScheme = rawData[valueIndex++] & 0xff;

            // parse image id
            d.mImageId = (rawData[valueIndex++] & 0xff) << 8;
            d.mImageId |= rawData[valueIndex++] & 0xff;
            // parse offset
            d.mHighOffset = (rawData[valueIndex++] & 0xff); // high byte offset
            d.mLowOffset = rawData[valueIndex++] & 0xff; // low byte offset

            d.mLength = ((rawData[valueIndex++] & 0xff) << 8 | (rawData[valueIndex++] & 0xff));
        } catch (IndexOutOfBoundsException e) {
            CatLog.d("ImageDescripter", "parse; failed parsing image descriptor");
            d = null;
        }
        return d;