candy.util
Class ExternalFile
java.lang.Object
|
+--candy.core.candyObject
|
+--candy.util.ExternalFile
- All Implemented Interfaces:
- net.jini.core.entry.Entry, java.io.Serializable
- public class ExternalFile
- extends candyObject
ExternalFile encapsulates the file sharing mechanism inside of candy.
This class is passed around through the JavaSpace and has an entry
in the server app's file_list.
- Author:
- Jason Corso (jcorso@cs.jhu.edu)
- See Also:
- Serialized Form
|
Field Summary |
byte[] |
data
the data itself of the ExternalFile |
ExternalFileMeta |
meta
The meta-information for this external file |
|
Constructor Summary |
ExternalFile()
Construct an empty ExternalFile for use as a template |
ExternalFile(ExternalFileMeta m)
Construct an empty ExternalFile with meta for use as a template |
ExternalFile(java.io.File f,
java.lang.String m)
Construct an ExternalFile form a File object |
|
Method Summary |
void |
exportData(java.io.File f)
Given the File f, the ExternalFile will write its data to disk |
void |
importData(java.io.File f)
importData launches a dialog allowing the user to select a file |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
meta
public ExternalFileMeta meta
- The meta-information for this external file
data
public byte[] data
- the data itself of the ExternalFile
ExternalFile
public ExternalFile(java.io.File f,
java.lang.String m)
- Construct an ExternalFile form a File object
ExternalFile
public ExternalFile()
- Construct an empty ExternalFile for use as a template
ExternalFile
public ExternalFile(ExternalFileMeta m)
- Construct an empty ExternalFile with meta for use as a template
importData
public void importData(java.io.File f)
- importData launches a dialog allowing the user to select a file
exportData
public void exportData(java.io.File f)
- Given the File f, the ExternalFile will write its data to disk