FileDocCategorySizeDatePackage
MtpObjectInfo.javaAPI DocAndroid 5.1 API6735Thu Mar 12 22:22:30 GMT 2015android.mtp

MtpObjectInfo

public final class MtpObjectInfo extends Object
This class encapsulates information about an object on an MTP device. This corresponds to the ObjectInfo Dataset described in section 5.3.1 of the MTP specification.

Fields Summary
private int
mHandle
private int
mStorageId
private int
mFormat
private int
mProtectionStatus
private int
mCompressedSize
private int
mThumbFormat
private int
mThumbCompressedSize
private int
mThumbPixWidth
private int
mThumbPixHeight
private int
mImagePixWidth
private int
mImagePixHeight
private int
mImagePixDepth
private int
mParent
private int
mAssociationType
private int
mAssociationDesc
private int
mSequenceNumber
private String
mName
private long
mDateCreated
private long
mDateModified
private String
mKeywords
Constructors Summary
private MtpObjectInfo()

    
Methods Summary
public final intgetAssociationDesc()
Returns the association description for the MTP object Will be zero objects that are not of format {@link android.mtp.MtpConstants#FORMAT_ASSOCIATION}

return
the object's association description

        return mAssociationDesc;
    
public final intgetAssociationType()
Returns the association type for the MTP object Will be zero objects that are not of format {@link android.mtp.MtpConstants#FORMAT_ASSOCIATION} For directories the association type is typically {@link android.mtp.MtpConstants#ASSOCIATION_TYPE_GENERIC_FOLDER}

return
the object's association type

        return mAssociationType;
    
public final intgetCompressedSize()
Returns the size of the MTP object

return
the object size

        return mCompressedSize;
    
public final longgetDateCreated()
Returns the creation date of the MTP object The value is represented as milliseconds since January 1, 1970

return
the object's creation date

        return mDateCreated;
    
public final longgetDateModified()
Returns the modification date of the MTP object The value is represented as milliseconds since January 1, 1970

return
the object's modification date

        return mDateModified;
    
public final intgetFormat()
Returns the format code for the MTP object

return
the format code

        return mFormat;
    
public final intgetImagePixDepth()
Returns the depth of the MTP object in bits per pixel Will be zero for non-image objects

return
the image depth

        return mImagePixDepth;
    
public final intgetImagePixHeight()
Returns the height of the MTP object in pixels Will be zero for non-image objects

return
the image height

        return mImagePixHeight;
    
public final intgetImagePixWidth()
Returns the width of the MTP object in pixels Will be zero for non-image objects

return
the image width

        return mImagePixWidth;
    
public final java.lang.StringgetKeywords()
Returns a comma separated list of keywords for the MTP object

return
the object's keyword list

        return mKeywords;
    
public final java.lang.StringgetName()
Returns the name of the MTP object

return
the object's name

        return mName;
    
public final intgetObjectHandle()
Returns the object handle for the MTP object

return
the object handle

        return mHandle;
    
public final intgetParent()
Returns the object handle for the object's parent Will be zero for the root directory of a storage unit

return
the object's parent

        return mParent;
    
public final intgetProtectionStatus()
Returns the protection status for the MTP object Possible values are:
  • {@link android.mtp.MtpConstants#PROTECTION_STATUS_NONE}
  • {@link android.mtp.MtpConstants#PROTECTION_STATUS_READ_ONLY}
  • {@link android.mtp.MtpConstants#PROTECTION_STATUS_NON_TRANSFERABLE_DATA}

return
the protection status

        return mProtectionStatus;
    
public final intgetSequenceNumber()
Returns the sequence number for the MTP object This field is typically not used for MTP devices, but is sometimes used to define a sequence of photos on PTP cameras.

return
the object's sequence number

        return mSequenceNumber;
    
public final intgetStorageId()
Returns the storage ID for the MTP object's storage unit

return
the storage ID

        return mStorageId;
    
public final intgetThumbCompressedSize()
Returns the size of the MTP object's thumbnail Will be zero for objects with no thumbnail

return
the thumbnail size

        return mThumbCompressedSize;
    
public final intgetThumbFormat()
Returns the format code for the MTP object's thumbnail Will be zero for objects with no thumbnail

return
the thumbnail format code

        return mThumbFormat;
    
public final intgetThumbPixHeight()
Returns the height of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail

return
the thumbnail height

        return mThumbPixHeight;
    
public final intgetThumbPixWidth()
Returns the width of the MTP object's thumbnail in pixels Will be zero for objects with no thumbnail

return
the thumbnail width

        return mThumbPixWidth;