blob: dbce37f984642c544a71094e7b9d96c579f19fff (
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
43
44
|
package examples.serialize;
import java.io.*;
public class Color
{
public Color(byte r, byte g, byte b) {
this.r = r; this.g = g; this.b = b;
}
byte r;
byte g;
byte b;
}
/*
public class Color implements Marshalable
{
byte r;
byte g;
byte b;
public Color(byte r, byte g, byte b) {
this.r = r; this.g = g; this.b = b;
}
public Color() {
}
public void readObject(ObjectIn is) throws IOException {
r = is.readByte();
g = is.readByte();
b = is.readByte();
}
public void writeObject(ObjectOut os) throws IOException {
os.writeUTF("Color");
os.writeByte(r);
os.writeByte(g);
os.writeByte(b);
}
}
*/
|