summaryrefslogtreecommitdiff
path: root/tutorial/examples/serialize/Point.oj
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/examples/serialize/Point.oj')
-rw-r--r--tutorial/examples/serialize/Point.oj29
1 files changed, 29 insertions, 0 deletions
diff --git a/tutorial/examples/serialize/Point.oj b/tutorial/examples/serialize/Point.oj
new file mode 100644
index 0000000..e7db5f9
--- /dev/null
+++ b/tutorial/examples/serialize/Point.oj
@@ -0,0 +1,29 @@
+package examples.serialize;
+
+import java.io.*;
+
+public class Point
+{
+ int x;
+ int y;
+}
+
+/*
+public class Point implements Marshalable
+{
+ int x;
+ int y;
+
+ public void readObject(ObjectIn is) throws IOException {
+ x = is.readInt();
+ y = is.readInt();
+ }
+
+ public void writeObject(ObjectOut os) throws IOException {
+ os.writeUTF("Point");
+ os.writeInt(x);
+ os.writeInt(y);
+
+ }
+}
+*/