/** * Streaming objects to local * @param obj objects to be streamed * @return true Success false Failure */ public static bool Ean Objecttotxt (Object obj) { ObjectOutputStream outputstream=null; try { outputstream=new Obje Ctoutputstream (New FileOutputStream ("E:/wo.txt")); outputstream.writeobject (obj); return true; catch (FileNotFoundException e) { e.printstacktrace (); } catch (IOException e) { &NBSP ; E.printstacktrace (); }finally{ if (null!=outputstream) { try { outputstream.close ();   ; catch (IOException e) { e.printstacktrace (), } } } R Eturn false; } /** * Convert local object file to entity * @param path to FilePath file * @return instance of desired entity */ public St atic Object txttoobject (String filePath) { ObjectInputStream inputstream=null; File file=New File (FilePath); if (!file.exists ()) return null; try { inputstream=new ObjectInputStream (new FileInputStream (file)); return Inputstream.readobject (); catch (FileNotFoundException e) { e.printstacktrace (); } catch (Exception e) { e . Printstacktrace (); }finally{ if (null!=inputstream) { try { inputstream.close (); & nbsp } catch (IOException e) { e.printstacktrace (); } } } return n Ull }
"Serialization and deserialization of Java"