-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIContact.java
45 lines (37 loc) · 1.26 KB
/
IContact.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
public interface IContact {
/**
* an object extending this method needs to add itself to the file using the FixedLengthStringIO class
*
*/
void writeObject(RandomAccessFile randomAccessFile) throws IOException;
/**
* an object extending this method needs to read itself from the file using the FixedLengthStringIO class.
*
*/
void readObject(long position, RandomAccessFile raf) throws IOException;
/**
* an object extending this method needs to export itself to a file using a format.
*
*/
void export(String format, File file) throws IOException;
/**
* an object extending this method needs to load itself from the file using a format.
*
*/
void loadFile(String format, File file)throws IOException, ClassNotFoundException;
/**
* an object extending this method needs to 'stringify' all of the data it wants to show on a frame
* and return a String array of the String data about itself
*
*/
String[] getUiData();
/**
* an object extending this method needs to return the object size on file
* objectSize will always equal = numOfFields*fieldSize*numOfBytes - numOfFields is handled by each child class
*
*/
int getObjectSize();
}