summaryrefslogtreecommitdiff
path: root/tutorial/examples/serialize/ColoredPoint.oj
diff options
context:
space:
mode:
authorKenny Ballou <kballou@devnulllabs.io>2018-11-19 22:59:50 -0700
committerKenny Ballou <kballou@devnulllabs.io>2018-11-19 22:59:50 -0700
commitea3e1b949dcbdc09518f17eee0bcf21d41d76896 (patch)
tree7ec7a7fb4df67815a9b7bb0e4d95d67c4050e2a2 /tutorial/examples/serialize/ColoredPoint.oj
downloadopenjava-ea3e1b949dcbdc09518f17eee0bcf21d41d76896.tar.gz
openjava-ea3e1b949dcbdc09518f17eee0bcf21d41d76896.tar.xz
OJ (aka OpenJava) modernization/mirroring
Signed-off-by: Kenny Ballou <kballou@devnulllabs.io>
Diffstat (limited to 'tutorial/examples/serialize/ColoredPoint.oj')
-rw-r--r--tutorial/examples/serialize/ColoredPoint.oj28
1 files changed, 28 insertions, 0 deletions
diff --git a/tutorial/examples/serialize/ColoredPoint.oj b/tutorial/examples/serialize/ColoredPoint.oj
new file mode 100644
index 0000000..30e534c
--- /dev/null
+++ b/tutorial/examples/serialize/ColoredPoint.oj
@@ -0,0 +1,28 @@
+package examples.serialize;
+
+import java.io.*;
+
+public class ColoredPoint
+{
+ public Color color = new Color((byte) 0, (byte) 0, (byte) 0);
+ public Point point = new Point();
+}
+
+/*
+public class ColoredPoint implements Marshalable
+{
+ public Color color = new Color((byte) 1, (byte) 3, (byte) 5);
+ public Point point = new Point();
+
+ public void writeObject(ObjectOut os) throws IOException {
+ os.writeUTF("ColoredPoint");
+ os.writeObject(color);
+ os.writeObject(point);
+ }
+
+ public void readObject(ObjectIn is) throws IOException {
+ color = (Color) is.readObject();
+ point = (Point) is.readObject();
+ }
+}
+*/