Package org.eclipse.ecf.filetransfer
Class FileTransferInfo
- java.lang.Object
-
- org.eclipse.ecf.filetransfer.FileTransferInfo
-
- All Implemented Interfaces:
Serializable
,org.eclipse.core.runtime.IAdaptable
,IFileTransferInfo
public class FileTransferInfo extends Object implements IFileTransferInfo, Serializable
File transfer information delivered toIIncomingFileTransferRequestListener
via an event implementingIFileTransferRequestEvent.getFileTransferInfo()
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
description
protected File
file
protected String
mimeType
protected Map
properties
-
Constructor Summary
Constructors Constructor Description FileTransferInfo(File file)
FileTransferInfo(File file, Map properties)
FileTransferInfo(File file, Map properties, String description)
FileTransferInfo(File file, Map properties, String description, String mimeType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
getAdapter(Class<T> adapter)
String
getDescription()
Get any description associated with this file transfer info.File
getFile()
Get the file for the proposed file transferlong
getFileSize()
Get the file size (in bytes).String
getMimeType()
Get the mime type string for this file transfer info.Map
getProperties()
Get any properties associated with this file transfer.
-
-
-
Constructor Detail
-
FileTransferInfo
public FileTransferInfo(File file)
-
-
Method Detail
-
getFile
public File getFile()
Description copied from interface:IFileTransferInfo
Get the file for the proposed file transfer- Specified by:
getFile
in interfaceIFileTransferInfo
- Returns:
- the proposed file. Will not return
null
.
-
getProperties
public Map getProperties()
Description copied from interface:IFileTransferInfo
Get any properties associated with this file transfer. The map keys and values are assumed to be Strings.- Specified by:
getProperties
in interfaceIFileTransferInfo
- Returns:
- Map of properties associated with this file transfer info. Will
not return
null
.
-
getDescription
public String getDescription()
Description copied from interface:IFileTransferInfo
Get any description associated with this file transfer info.- Specified by:
getDescription
in interfaceIFileTransferInfo
- Returns:
- String description. May be
null
if no description provided.
-
getAdapter
public <T> T getAdapter(Class<T> adapter)
- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
-
getFileSize
public long getFileSize()
Description copied from interface:IFileTransferInfo
Get the file size (in bytes).- Specified by:
getFileSize
in interfaceIFileTransferInfo
- Returns:
- long file size (in bytes). If file size is unknown, will return -1.
-
getMimeType
public String getMimeType()
Description copied from interface:IFileTransferInfo
Get the mime type string for this file transfer info.- Specified by:
getMimeType
in interfaceIFileTransferInfo
- Returns:
- String mime type. May return
null
if mime type is not known.
-
-