Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When serializing my non-serializble FSDK.FSDK_FaceTemplate.ByReference class i do the following below
C#
public class FSDKTemplate extends FSDK.FSDK_FaceTemplate.ByReference implements Serializable{

    private transient FSDK.FSDK_FaceTemplate.ByReference template;

    //private transient byte[] template;

    public void setTemplate(FSDK.FSDK_FaceTemplate.ByReference template)
    {
        this.template = template;
        //super.template = this.template;
    }

    public FSDK.FSDK_FaceTemplate.ByReference getTemplate()
    {
        return this.template;
    }


   public void writeObject(ObjectOutputStream os) throws IOException
   {
       os.defaultWriteObject();
       os.writeObject(this.template);
       os.close();
   }

   public void readObject(ObjectInputStream is) throws ClassNotFoundException, IOException
   {
       is.defaultReadObject();
       is.readObject();
   }
}

but it seems like when de-serializing the class i don't get the right format for what i need the class and am guessing its because of the way i wrote the codes above in other to serialize my non-serializble class. is there something i did wrong while doing the above?
Posted
Comments
Sergey Alexandrovich Kryukov 7-Mar-15 11:53am    
Make it serializable? :-)
—SA
Shubhashish_Mandal 10-Mar-15 4:29am    
private transient FSDK.FSDK_FaceTemplate.ByReference template;

Are you trying to persist/write a transient Object?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900