public static class DropBoxManager.Entry extends Object implements Parcelable, Closeable
close()
when you are done using it.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<DropBoxManager.Entry> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
DropBoxManager.Entry(String tag,
long millis)
Create a new empty Entry with no 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,
File data,
int flags)
Create a new Entry with the contents read from a file.
|
DropBoxManager.Entry(String tag,
long millis,
ParcelFileDescriptor data,
int flags)
Create a new Entry with streaming data contents.
|
DropBoxManager.Entry(String tag,
long millis,
String text)
Create a new Entry with plain text contents.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the input stream associated with this entry.
|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
|
int |
getFlags() |
InputStream |
getInputStream() |
String |
getTag() |
String |
getText(int maxBytes) |
long |
getTimeMillis() |
void |
writeToParcel(Parcel out,
int flags)
Flatten this object in to a Parcel.
|
public static final Parcelable.Creator<DropBoxManager.Entry> CREATOR
public DropBoxManager.Entry(String tag, long millis)
public DropBoxManager.Entry(String tag, long millis, String text)
public DropBoxManager.Entry(String tag, long millis, byte[] data, int flags)
public DropBoxManager.Entry(String tag, long millis, ParcelFileDescriptor data, int flags)
public DropBoxManager.Entry(String tag, long millis, File data, int flags) throws IOException
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public String getTag()
public long getTimeMillis()
public int getFlags()
getInputStream()
.public String getText(int maxBytes)
maxBytes
- of string to return (will truncate at this length).public InputStream getInputStream() throws IOException
IOException
public int describeContents()
Parcelable
describeContents
in interface Parcelable
public void writeToParcel(Parcel out, int flags)
Parcelable
writeToParcel
in interface Parcelable
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.PARCELABLE_WRITE_RETURN_VALUE
.