blob: 1e41754c4d081023cb5ec145463159900887f0ab (
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
40
41
42
|
import java.io.*;
public class OOSNoCallDefault implements Serializable
{
int x;
String s;
boolean b;
OOSNoCallDefault()
{}
OOSNoCallDefault( int X, String S, boolean B )
{
x = X;
s = S;
b = B;
}
public boolean equals( Object o )
{
OOSNoCallDefault oo = (OOSNoCallDefault)o;
return oo.x == x
&& oo.b == b
&& oo.s.equals( s );
}
private void writeObject( ObjectOutputStream oos ) throws IOException
{
oos.writeInt( x );
oos.writeObject( s );
oos.writeBoolean( b );
}
private void readObject( ObjectInputStream ois )
throws ClassNotFoundException, IOException
{
x = ois.readInt();
s = (String)ois.readObject();
b = ois.readBoolean();
}
}
|