DropBoxManager.Entry
public
static
class
DropBoxManager.Entry
extends Object
implements
Parcelable,
Closeable
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
Public constructors |
DropBoxManager.Entry(String tag, long millis)
Create a new empty Entry with no contents.
|
DropBoxManager.Entry(String tag, long millis, String text)
Create a new Entry with plain text contents.
|
DropBoxManager.Entry(String tag, long millis, byte[] data, int flags)
Create a new Entry with byte array contents.
|
DropBoxManager.Entry(String tag, long millis, ParcelFileDescriptor data, int flags)
Create a new Entry with streaming data contents.
|
DropBoxManager.Entry(String tag, long millis, File data, int flags)
Create a new Entry with the contents read from a file.
|
Inherited methods |
From
class
java.lang.Object
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 millis, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long millis)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
From
interface
android.os.Parcelable
abstract
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
abstract
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
|
|
From
interface
java.io.Closeable
abstract
void
|
close()
Closes this stream and releases any system resources associated
with it.
|
|
From
interface
java.lang.AutoCloseable
abstract
void
|
close()
Closes this resource, relinquishing any underlying resources.
|
|
Fields
Public constructors
DropBoxManager.Entry
DropBoxManager.Entry (String tag,
long millis)
Create a new empty Entry with no contents.
Parameters |
tag |
String
|
millis |
long
|
DropBoxManager.Entry
DropBoxManager.Entry (String tag,
long millis,
String text)
Create a new Entry with plain text contents.
Parameters |
tag |
String
|
millis |
long
|
text |
String
|
DropBoxManager.Entry
DropBoxManager.Entry (String tag,
long millis,
byte[] data,
int flags)
Create a new Entry with byte array contents.
The data array must not be modified after creating this entry.
Parameters |
tag |
String
|
millis |
long
|
data |
byte
|
flags |
int
|
DropBoxManager.Entry
DropBoxManager.Entry (String tag,
long millis,
ParcelFileDescriptor data,
int flags)
Create a new Entry with streaming data contents.
Takes ownership of the ParcelFileDescriptor.
Parameters |
tag |
String
|
millis |
long
|
data |
ParcelFileDescriptor
|
flags |
int
|
DropBoxManager.Entry
DropBoxManager.Entry (String tag,
long millis,
File data,
int flags)
Create a new Entry with the contents read from a file.
The file will be read when the entry's contents are requested.
Parameters |
tag |
String
|
millis |
long
|
data |
File
|
flags |
int
|
Public methods
close
void close ()
Close the input stream associated with this entry.
describeContents
int describeContents ()
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.
Returns |
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance. |
getInputStream
InputStream getInputStream ()
Returns |
InputStream |
the uncompressed contents of the entry, or null if the contents were lost |
getTag
String getTag ()
Returns |
String |
the tag originally attached to the entry. |
getText
String getText (int maxBytes)
Parameters |
maxBytes |
int :
of string to return (will truncate at this length). |
Returns |
String |
the uncompressed text contents of the entry, null if the entry is not text.
|
getTimeMillis
long getTimeMillis ()
Returns |
long |
time when the entry was originally created. |
writeToParcel
void writeToParcel (Parcel out,
int flags)
Flatten this object in to a Parcel.
Parameters |
out |
Parcel :
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 .
|