Class Overview
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.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
From interface
android.os.Parcelable
abstract
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
abstract
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
|
|
From interface
java.io.Closeable
abstract
void
|
close()
Closes the object and release any system resources it holds.
|
|
From interface
java.lang.AutoCloseable
abstract
void
|
close()
Closes the object and release any system resources it holds.
|
|
Fields
Public Constructors
public
DropBoxManager.Entry
(String tag, long millis)
Create a new empty Entry with no contents.
public
DropBoxManager.Entry
(String tag, long millis, String text)
Create a new Entry with plain text contents.
public
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.
public
DropBoxManager.Entry
(String tag, long millis, ParcelFileDescriptor data, int flags)
Create a new Entry with streaming data contents.
Takes ownership of the ParcelFileDescriptor.
public
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.
Public Methods
public
void
close
()
Close the input stream associated with this entry.
public
int
describeContents
()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
Returns
- a bitmask indicating the set of special object types marshalled
by the Parcelable.
public
InputStream
getInputStream
()
Returns
- the uncompressed contents of the entry, or null if the contents were lost
public
String
getTag
()
Returns
- the tag originally attached to the entry.
public
String
getText
(int maxBytes)
Parameters
maxBytes
| of string to return (will truncate at this length). |
Returns
- the uncompressed text contents of the entry, null if the entry is not text.
public
long
getTimeMillis
()
Returns
- time when the entry was originally created.
public
void
writeToParcel
(Parcel out, int flags)
Flatten this object in to a Parcel.
Parameters
out
| The Parcel in which the object should be written. |
flags
| Additional flags about how the object should be written.
May be 0 or PARCELABLE_WRITE_RETURN_VALUE .
|