FileTransfer provides a platform specific mechanism
for converting a list of files represented as a java String[] to a
platform specific representation of the data and vice versa.
Each String in the array contains the absolute path for a single
file or directory.
An example of a java String[] containing a list of files is shown
below:
File file1 = new File("C:\\temp\\file1");
File file2 = new File("C:\\temp\\file2");
String[] fileData = new String[2];
fileData[0] = file1.getAbsolutePath();
fileData[1] = file2.getAbsolutePath();
Transfer
| Modifier and Type | Field and Description |
|---|---|
| private static FileTransfer | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| public static FileTransfer | Returns: the singleton instance of the FileTransfer classReturns the singleton instance of the FileTransfer class. |
| protected int[] | getTypeIds()
Implements abstract org. |
| protected String[] | getTypeNames()
Implements abstract org. |
| public void | javaToNative(Object
a java object, TransferData String[] containing the file names to be convertedan empty transferData)TransferData object that will
be filled in on return with the platform specific format of the dataOverrides org. javaToNative converts a list of file names
represented by a java String[] to a platform specific representation.
|
| public Object | Returns: a javaString[] containing a list of file names if the conversion
was successful; otherwise nullthe platform specific representation of the data to be converted transferData)Overrides org. nativeToJava converts a platform specific
representation of a list of file names to a java String[].
|
| protected boolean | validate(Object
a java representation of the data to be converted object)Overrides org. |
| _instance | back to summary |
|---|---|
| private static FileTransfer _instance | |
| GNOME_LIST | back to summary |
|---|---|
| private static final String GNOME_LIST | |
| GNOME_LIST_ID | back to summary |
|---|---|
| private static final int GNOME_LIST_ID | |
| URI_LIST | back to summary |
|---|---|
| private static final String URI_LIST | |
| URI_LIST_ID | back to summary |
|---|---|
| private static final int URI_LIST_ID | |
| FileTransfer | back to summary |
|---|---|
| private FileTransfer() | |
| checkFile | back to summary |
|---|---|
| pack-priv boolean checkFile(Object object) | |
| getInstance | back to summary |
|---|---|
| public static FileTransfer getInstance() Returns the singleton instance of the FileTransfer class.
| |
| getTypeIds | back to summary |
|---|---|
| protected int[] getTypeIds() Implements abstract org. Doc from org. Returns the platform specific ids of the data types that can be converted using this transfer agent.
| |
| getTypeNames | back to summary |
|---|---|
| protected String[] getTypeNames() Implements abstract org. Doc from org. Returns the platform specific names of the data types that can be converted using this transfer agent. | |
| javaToNative | back to summary |
|---|---|
| public void javaToNative(Object object, TransferData transferData) Overrides org. This implementation of
| |
| nativeToJava | back to summary |
|---|---|
| public Object nativeToJava(TransferData transferData) Overrides org. This implementation of
| |
| validate | back to summary |
|---|---|
| protected boolean validate(Object object) Overrides org. Doc from org. Test that the object is of the correct format for this Transfer class. | |