|
|
@ -18,10 +18,12 @@ public class Main { |
|
|
|
data.add(new Person("Jorge", 2)); |
|
|
|
data.add(new Person("Pepe", 89)); |
|
|
|
|
|
|
|
boolean isWrited = ObjWriter.write(data,file); |
|
|
|
//Check writing |
|
|
|
boolean isWritten = ObjWriter.write(data,file); |
|
|
|
|
|
|
|
//Test serialization |
|
|
|
People dat = null; |
|
|
|
if (isWrited) { |
|
|
|
if (isWritten) { |
|
|
|
dat = (People) ObjReader.read(file); |
|
|
|
} |
|
|
|
if (dat != null){ |
|
|
|