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
File transfer information delivered to
IIncomingFileTransferRequestListener
via an event implementing
IFileTransferRequestEvent.getFileTransferInfo()
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFileTransferInfo
(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
Modifier and TypeMethodDescription<T> T
getAdapter
(Class<T> adapter) Get any description associated with this file transfer info.getFile()
Get the file for the proposed file transferlong
Get the file size (in bytes).Get the mime type string for this file transfer info.Get any properties associated with this file transfer.
-
Field Details
-
file
-
properties
-
description
-
mimeType
-
-
Constructor Details
-
FileTransferInfo
-
FileTransferInfo
-
FileTransferInfo
-
FileTransferInfo
-
-
Method Details
-
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
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
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
- 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
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.
-