Entry

open class Entry : Parcelable, Closeable
kotlin.Any
   ↳ android.os.DropBoxManager.Entry

A single entry retrieved from the drop box. This may include a reference to a stream, so you must call #close() when you are done using it.
Requires API level 8 (Android 2.2, Froyo)

Summary

Inherited constants
Public constructors
<init>(tag: String!, millis: Long)

Create a new empty Entry with no contents.

<init>(tag: String!, millis: Long, text: String!)

Create a new Entry with plain text contents.

<init>(tag: String!, millis: Long, data: ByteArray!, flags: Int)

Create a new Entry with byte array contents.

<init>(tag: String!, millis: Long, data: ParcelFileDescriptor!, flags: Int)

Create a new Entry with streaming data contents.

<init>(tag: String!, millis: Long, data: File!, flags: Int)

Create a new Entry with the contents read from a file.

Public methods
open Int

Requires API level 8 (Android 2.2, Froyo)

open String!
getText(maxBytes: Int)


Requires API level 8 (Android 2.2, Froyo)

open Unit
writeToParcel(out: Parcel!, flags: Int)

Flatten this object in to a Parcel.

open Long

Requires API level 8 (Android 2.2, Froyo)

open String!

Requires API level 8 (Android 2.2, Froyo)

open Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

open Unit

Close the input stream associated with this entry.

open InputStream!

Requires API level 8 (Android 2.2, Froyo)

Properties
static Parcelable.Creator<DropBoxManager.Entry!>!

Requires API level 8 (Android 2.2, Froyo)

Public constructors

<init>

Entry(tag: String!, millis: Long)

Create a new empty Entry with no contents.

<init>

Entry(tag: String!, millis: Long, text: String!)

Create a new Entry with plain text contents.

<init>

Entry(tag: String!, millis: Long, data: ByteArray!, flags: Int)

Create a new Entry with byte array contents. The data array must not be modified after creating this entry.

<init>

Entry(tag: String!, millis: Long, data: ParcelFileDescriptor!, flags: Int)

Create a new Entry with streaming data contents. Takes ownership of the ParcelFileDescriptor.

<init>

Entry(tag: String!, millis: Long, data: File!, flags: Int)

Create a new Entry with the contents read from a file. The file will be read when the entry's contents are requested.

Public methods

getFlags

added in API level 8
open fun getFlags(): Int

Requires API level 8 (Android 2.2, Froyo)

Return
Int: flags describing the content returned by #getInputStream().

getText

added in API level 8
open fun getText(maxBytes: Int): String!


Requires API level 8 (Android 2.2, Froyo)

Parameters
maxBytes Int: of string to return (will truncate at this length).
Return
String!: the uncompressed text contents of the entry, null if the entry is not text.

writeToParcel

added in API level 8
open fun writeToParcel(out: Parcel!, flags: Int): Unit

Flatten this object in to a Parcel. Requires API level 8 (Android 2.2, Froyo)

Parameters
dest Parcel!: The Parcel in which the object should be written.
flags Parcel!: Additional flags about how the object should be written. May be 0 or #PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

getTimeMillis

added in API level 8
open fun getTimeMillis(): Long

Requires API level 8 (Android 2.2, Froyo)

Return
Long: time when the entry was originally created.

getTag

added in API level 8
open fun getTag(): String!

Requires API level 8 (Android 2.2, Froyo)

Return
String!: the tag originally attached to the entry.

describeContents

added in API level 8
open fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of #writeToParcel(Parcel, int), the return value of this method must include the #CONTENTS_FILE_DESCRIPTOR bit. Requires API level 8 (Android 2.2, Froyo)

Return
Int: a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

close

added in API level 8
open fun close(): Unit

Close the input stream associated with this entry.
Requires API level 8 (Android 2.2, Froyo)

Exceptions
Exception if this resource cannot be closed
IOException if an I/O error occurs

getInputStream

added in API level 8
open fun getInputStream(): InputStream!

Requires API level 8 (Android 2.2, Froyo)

Return
InputStream!: the uncompressed contents of the entry, or null if the contents were lost

Properties

CREATOR

added in API level 8
static val CREATOR: Parcelable.Creator<DropBoxManager.Entry!>!

Requires API level 8 (Android 2.2, Froyo)