Monday, July 19, 2010

Serializable Test

after encountering the non serializable com.google.gdata.client.docs.DocsService class which i need to deploy to appengine, i have to download the gdata-client source and test it with this code,

GDocs, and GDataAuth are just wrappers for those classes

public class test {
public static void main(String[] args) throws FileNotFoundException, IOException {
GDocs docs= new GDocs("aaa", "bbb", "aaa");
GDataAuth auth= new GDataAuth(null, "dfdf", "dfd");

ObjectOutputStream o= new ObjectOutputStream(
new FileOutputStream(new File("/tmp/o.test"))
);

o.writeObject(docs);

ObjectOutputStream o2= new ObjectOutputStream(
new FileOutputStream(new File("/tmp/o2.test"))
);

}
}