HERE'S THE CODE ..
URLConnection con = servlet.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
ObjectOutputStream out = new ObjectOutputStream(SecurityToolkit.openOutputStream(con));
int numObjects = objs.length;
for (int x = 0; x < numObjects; x++) {
out.writeObject(objs[x]);
}
out.flush();
out.close();
InputStream inStream = SecurityToolkit.openInputStream(con);
ObjectInputStream in = new ObjectInputStream(inStream);
//
return in;
So .. this is the ObjectInputStream returned and objects are read off this stream. But reading hangs for 30 seconds and then starts reading again.