org.eclipse.ecf.filetransfer
Class FileTransferInfo

java.lang.Object
  extended by org.eclipse.ecf.filetransfer.FileTransferInfo
All Implemented Interfaces:
java.io.Serializable, org.eclipse.core.runtime.IAdaptable, IFileTransferInfo

public class FileTransferInfo
extends java.lang.Object
implements IFileTransferInfo, java.io.Serializable

File transfer information delivered to IIncomingFileTransferRequestListener via an event implementing IFileTransferRequestEvent.getFileTransferInfo()

See Also:
Serialized Form

Field Summary
protected  java.lang.String description
           
protected  java.io.File file
           
protected  java.lang.String mimeType
           
protected  java.util.Map properties
           
 
Constructor Summary
FileTransferInfo(java.io.File file)
           
FileTransferInfo(java.io.File file, java.util.Map properties)
           
FileTransferInfo(java.io.File file, java.util.Map properties, java.lang.String description)
           
FileTransferInfo(java.io.File file, java.util.Map properties, java.lang.String description, java.lang.String mimeType)
           
 
Method Summary
 java.lang.Object getAdapter(java.lang.Class adapter)
           
 java.lang.String getDescription()
          Get any description associated with this file transfer info.
 java.io.File getFile()
          Get the file for the proposed file transfer
 long getFileSize()
          Get the file size (in bytes).
 java.lang.String getMimeType()
          Get the mime type string for this file transfer info.
 java.util.Map getProperties()
          Get any properties associated with this file transfer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected java.io.File file

properties

protected java.util.Map properties

description

protected java.lang.String description

mimeType

protected java.lang.String mimeType
Constructor Detail

FileTransferInfo

public FileTransferInfo(java.io.File file)

FileTransferInfo

public FileTransferInfo(java.io.File file,
                        java.util.Map properties)

FileTransferInfo

public FileTransferInfo(java.io.File file,
                        java.util.Map properties,
                        java.lang.String description)

FileTransferInfo

public FileTransferInfo(java.io.File file,
                        java.util.Map properties,
                        java.lang.String description,
                        java.lang.String mimeType)
Method Detail

getFile

public java.io.File getFile()
Description copied from interface: IFileTransferInfo
Get the file for the proposed file transfer

Specified by:
getFile in interface IFileTransferInfo
Returns:
the proposed file. Will not return null.

getProperties

public java.util.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 interface IFileTransferInfo
Returns:
Map of properties associated with this file transfer info. Will not return null.

getDescription

public java.lang.String getDescription()
Description copied from interface: IFileTransferInfo
Get any description associated with this file transfer info.

Specified by:
getDescription in interface IFileTransferInfo
Returns:
String description. May be null if no description provided.

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable

getFileSize

public long getFileSize()
Description copied from interface: IFileTransferInfo
Get the file size (in bytes).

Specified by:
getFileSize in interface IFileTransferInfo
Returns:
long file size (in bytes). If file size is unknown, will return -1.

getMimeType

public java.lang.String getMimeType()
Description copied from interface: IFileTransferInfo
Get the mime type string for this file transfer info.

Specified by:
getMimeType in interface IFileTransferInfo
Returns:
String mime type. May return null if mime type is not known.