コード例 #1
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   super.readExternal(in);
   directRootSerialization = in.readBoolean();
   if (directRootSerialization) root = (VirtualFile) in.readObject();
   else {
     VirtualFileSerializator serializator = (VirtualFileSerializator) in.readObject();
     root = serializator.getFile();
   }
 }
コード例 #2
0
 public void writeExternal(ObjectOutput out) throws IOException {
   super.writeExternal(out);
   out.writeBoolean(directRootSerialization);
   if (directRootSerialization) out.writeObject(root);
   else out.writeObject(new VirtualFileSerializator(root));
 }