blob: c0465c12ee5f9b509241ee525a9e892e8aaa7514 (
plain)
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
|
import java.io.*;
public class OOSCallDefault implements Serializable
{
int x;
double y;
transient String s;
OOSCallDefault( int X, double Y, String S )
{
x = X;
y = Y;
s = S;
}
public boolean equals( Object o )
{
OOSCallDefault oo = (OOSCallDefault)o;
return oo.x == x
&& oo.y == y
&& oo.s.equals( s );
}
private void writeObject( ObjectOutputStream oos ) throws IOException
{
oos.writeObject( s );
oos.defaultWriteObject();
oos.writeObject( s );
}
private void readObject( ObjectInputStream ois )
throws ClassNotFoundException, IOException
{
ois.readObject();
ois.defaultReadObject();
s = (String)ois.readObject();
}
}
|