MtpObjectInfo.Builder


public static class MtpObjectInfo.Builder
extends Object

java.lang.Object
   ↳ android.mtp.MtpObjectInfo.Builder


Builds a new object info instance.

Summary

Public constructors

Builder()
Builder(MtpObjectInfo objectInfo)

Creates a builder on a copy of an existing object info.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in API level 24
public Builder ()

Builder

Added in API level 24
public Builder (MtpObjectInfo objectInfo)

Creates a builder on a copy of an existing object info. All fields, except the object handle will be copied.

Parameters
objectInfo MtpObjectInfo: object info of an existing entry

Public methods

build

Added in API level 24
public MtpObjectInfo build ()

Builds the object info instance. Once called, methods of the builder must not be called anymore.

Returns
MtpObjectInfo the object info of the newly created file, or NULL in case of an error.

setAssociationDesc

Added in API level 24
public MtpObjectInfo.Builder setAssociationDesc (int value)

Parameters
value int

setAssociationType

Added in API level 24
public MtpObjectInfo.Builder setAssociationType (int value)

Parameters
value int

setCompressedSize

Added in API level 24
public MtpObjectInfo.Builder setCompressedSize (long value)

Parameters
value long

setDateCreated

Added in API level 24
public MtpObjectInfo.Builder setDateCreated (long value)

Parameters
value long

setDateModified

Added in API level 24
public MtpObjectInfo.Builder setDateModified (long value)

Parameters
value long

setFormat

Added in API level 24
public MtpObjectInfo.Builder setFormat (int value)

Parameters
value int

setImagePixDepth

Added in API level 24
public MtpObjectInfo.Builder setImagePixDepth (long value)

Parameters
value long

setImagePixHeight

Added in API level 24
public MtpObjectInfo.Builder setImagePixHeight (long value)

Parameters
value long

setImagePixWidth

Added in API level 24
public MtpObjectInfo.Builder setImagePixWidth (long value)

Parameters
value long

setKeywords

Added in API level 24
public MtpObjectInfo.Builder setKeywords (String value)

Parameters
value String: This value cannot be null.

setName

Added in API level 24
public MtpObjectInfo.Builder setName (String value)

Parameters
value String: This value cannot be null.

setObjectHandle

Added in API level 24
public MtpObjectInfo.Builder setObjectHandle (int value)

Parameters
value int

setParent

Added in API level 24
public MtpObjectInfo.Builder setParent (int value)

Parameters
value int

setProtectionStatus

Added in API level 24
public MtpObjectInfo.Builder setProtectionStatus (int value)

Parameters
value int

setSequenceNumber

Added in API level 24
public MtpObjectInfo.Builder setSequenceNumber (long value)

Parameters
value long

setStorageId

Added in API level 24
public MtpObjectInfo.Builder setStorageId (int value)

Parameters
value int

setThumbCompressedSize

Added in API level 24
public MtpObjectInfo.Builder setThumbCompressedSize (long value)

Parameters
value long

setThumbFormat

Added in API level 24
public MtpObjectInfo.Builder setThumbFormat (int value)

Parameters
value int

setThumbPixHeight

Added in API level 24
public MtpObjectInfo.Builder setThumbPixHeight (long value)

Parameters
value long

setThumbPixWidth

Added in API level 24
public MtpObjectInfo.Builder setThumbPixWidth (long value)

Parameters
value long