public class LocalFile
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LocalFile.Thumbnail
A data type represents a thumbnail of this local file.
|
Constructor and Description |
---|
LocalFile(java.io.File file)
Constructs a
LocalFile object out of a local file . |
LocalFile(java.io.File file,
java.lang.String mime,
LocalFile.Thumbnail thumbnail,
MessageClient.ProgressHandler progressHandler)
Constructs a
LocalFile object out of a local File . |
Modifier and Type | Method and Description |
---|---|
java.io.File |
getFile()
Returns the local
File object to be uploaded. |
java.lang.String |
getMimeType()
Returns the MIME type of this file.
|
java.lang.String |
getName()
Returns the display name of the uploaded file.
|
java.lang.String |
getPath()
Returns the local path to the file to be uploaded..
|
MessageClient.ProgressHandler |
getProgressHandler()
Returns the
MessageClient.ProgressHandler used when uploading this file. |
long |
getSize()
Returns the size in bytes of the file.
|
LocalFile.Thumbnail |
getThumbnail()
Return the thumbnail for the local file.
|
void |
setFile(java.io.File file)
Deprecated.
|
void |
setMimeType(java.lang.String mimeType)
Deprecated.
|
void |
setName(java.lang.String name)
Deprecated.
|
void |
setPath(java.lang.String path)
Deprecated.
|
void |
setProgressHandler(MessageClient.ProgressHandler progressHandler)
Deprecated.
|
void |
setSize(long size)
Deprecated.
|
void |
setThumbnail(LocalFile.Thumbnail thumbnail)
Deprecated.
|
public LocalFile(@NonNull java.io.File file)
LocalFile
object out of a local file
.file
- An existing local file.public LocalFile(@NonNull java.io.File file, @Nullable java.lang.String mime, @Nullable LocalFile.Thumbnail thumbnail, @Nullable MessageClient.ProgressHandler progressHandler)
LocalFile
object out of a local File
.file
- An existing local file.mime
- The MIME type of the file, according to RFC6838.thumbnail
- The thumbnail for the local file. If not null, the thumbnail will be uploaded with the local file.progressHandler
- The progress indicator callback for uploading progresses.public java.io.File getFile()
File
object to be uploaded.File
object to be uploaded.public java.lang.String getPath()
public java.lang.String getName()
public long getSize()
public java.lang.String getMimeType()
public MessageClient.ProgressHandler getProgressHandler()
MessageClient.ProgressHandler
used when uploading this file.MessageClient.ProgressHandler
. Null if no MessageClient.ProgressHandler
is set.public LocalFile.Thumbnail getThumbnail()
@Deprecated public void setFile(java.io.File file)
@Deprecated public void setPath(java.lang.String path)
@Deprecated public void setName(java.lang.String name)
@Deprecated public void setSize(long size)
@Deprecated public void setMimeType(java.lang.String mimeType)
@Deprecated public void setProgressHandler(MessageClient.ProgressHandler progressHandler)
@Deprecated public void setThumbnail(LocalFile.Thumbnail thumbnail)