On 13/07/2010 18:13, Kasper Nielsen wrote:

s.writeInt(Integer.MAX_VALUE);

for (int i=0;i<Integer.MAX_VALUE;i++) {

}

s.writeLong(size);//write the real size

for (long i=Integer.MAX_VALUE;i<size;i++) {
  ...read remaining elements
}

Adding a field to the serial form would probably be better.

Tom

Reply via email to