ok.... i tried to increase the stack size by using both
java -Xss128m file &&
java -Xoss128m file
However the file written to writes upto a particular size( in my case 3,189kb) and gives the Exception.
java.lang.StackOverflowError
at sun.misc.SoftCache.get(SoftCache.java:269)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:238)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1010)
at java.io.ObjectOutputStream.defaultWriteFields (ObjectOutputStream.java:1330)
at java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1302)
at java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
The last 4 lines get repeated all over again..