Google is committed to advancing racial equity for Black communities. See how.
Added in API level 8

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.

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 Unit

Close the input stream associated with this entry.

open Int

open Int

open InputStream!

open String!

open String!
getText(maxBytes: Int)

open Long

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

Properties
static Parcelable.Creator<DropBoxManager.Entry!>

Public constructors

<init>

Added in API level 8
Entry(
    tag: String!,
    millis: Long)

Create a new empty Entry with no contents.

<init>

Added in API level 8
Entry(
    tag: String!,
    millis: Long,
    text: String!)

Create a new Entry with plain text contents.

<init>

Added in API level 8
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>

Added in API level 8
Entry(
    tag: String!,
    millis: Long,
    data: ParcelFileDescriptor!,
    flags: Int)

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

<init>

Added in API level 8
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

close

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

Close the input stream associated with this entry.

Exceptions
java.lang.Exception if this resource cannot be closed
java.io.IOException if an I/O error occurs

describeContents

Added in API level 8
open fun describeContents(): Int
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

getFlags

Added in API level 8
open fun getFlags(): Int
Return
Int flags describing the content returned by getInputStream().

getInputStream

Added in API level 8
open fun getInputStream(): InputStream!
Return
InputStream! the uncompressed contents of the entry, or null if the contents were lost

getTag

Added in API level 8
open fun getTag(): String!
Return
String! the tag originally attached to the entry.

getText

Added in API level 8
open fun getText(maxBytes: Int): String!
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.

getTimeMillis

Added in API level 8
open fun getTimeMillis(): Long
Return
Long time when the entry was originally created.

writeToParcel

Added in API level 8
open fun writeToParcel(
    out: Parcel!,
    flags: Int
): Unit
Parameters
dest The Parcel in which the object should be written.
flags Int: 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

Properties

CREATOR

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