Janak,

I want to make sure this the correct process.

I have a class that looks like this:

   static enum PropertyIds {
       Dummy
   };

and I have implemented a coder that looks like this.

public class PropertyIdsCoder implements IStreamCoder {

   public String getPeerClassName() {
       return PropertyFactory.PropertyIds.class.getName();
   }

   public void writeObject(IObjectOutputStream out, Object data) {
       try {
           out.writeObject(PropertyFactory.PropertyIds.Dummy.name());
       } catch (IOException e) {
           e.printStackTrace();  //To change body of catch statement
      }
   }

   public Object readObject(IObjectInputStream in) throws IOException {
    String s = (String)in.readObject();
       Enum p = PropertyFactory.PropertyIds.valueOf(s);
       return p;
   }

}

Is correct?

Mario
Abacus Research


_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to