How to generate .ser file?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   chao_yuan
Posted On:   Saturday, October 21, 2006 02:57 AM


I would like to know how to generate .ser file?


Is there any java command to generate it or I need to write code my self. If so, does any one have the code snippet?

Thanks in advance!

Re: How to generate .ser file?

Posted By:   David_Matthews  
Posted On:   Tuesday, December 12, 2006 11:23 AM

try{

FileOutputStream f = new FileOutputStream("file.ser");

ObjectOutputStream o = new ObjectOutputStream(f);

o.writeObject();

o.close();

f.close();

}

catch(IOException e){}

Re: How to generate .ser file?

Posted By:   Robert_Lybarger  
Posted On:   Saturday, October 21, 2006 11:03 PM

Are you just asking about readObject / writeObject provide, for example, by Object[Input/Output]Stream classes?