Seralization

  • The process of writing state of ab object to a file is caleed seralization
  • using ObjectOutStream(FileOutPutStream f) class we can achieve serialization
FileOutputStream fos = new FileOutputStream("abc.txt", true);
ObjectOutputStream oos = new ObjectOutputStream(fos);

oos.writeObject(object)
FileInPutStream fos = new FileInPutStream("abc.txt", true);
ObjectInputStream oos = new ObjectInputStream(fos);

oos.readObject()

results matching ""

    No results matching ""