Home » Developer & Programmer » JDeveloper, Java & XML » serializing an object
serializing an object [message #92795] Wed, 26 January 2005 10:04 Go to next message
aruna
Messages: 33
Registered: January 2002
Member
I wanted to create a txt/.dat file with some data on it. How should I do this using serialization?

Thanks in advance
Aruna.
Re: serializing an object [message #92797 is a reply to message #92795] Thu, 27 January 2005 06:38 Go to previous message
Scott Swank
Messages: 24
Registered: January 2005
Junior Member
Serialization is for converting an object to a binary format that is suitable for network transfer or storage to a file system. A serializable object is one that does not have any external resources attached to it -- so you can serialize it, perhaps save it to disk, later read it from disk, de-serialize it: and voila! you have your object back.

If you want to write text to an os file, then you want to look at classes like (text data) FileReader & FileWriter or (binary data) FileInputStream & FileOutputStream.

Scott
Previous Topic: Connection Pooling
Next Topic: ClassNotFoundException(oracle.jdbc.driver.OracleDriver)
Goto Forum:
  


Current Time: Mon Nov 25 19:01:46 CST 2024