Henry Wong wrote:
Java serialization is a binary format. Also, it is a format that is defined by Java. You can't just change the format to suit your needs.... okay, actually, you can somewhat by overriding the readObject() and writeObject() methods, but even then, the headers are still fixed and in binary format.
Thanks for the interest and to challenge me, it is clear, I should use the bufferedreader format, but in principle if I can "press the object" in the heap to make it binary I would like to have it back
If you want to output something in an exact format, then why can't you use the object itself -- and code that gets the data and calls System.out.print() ?
Henry
It is what I am trying to do it, i wrote the object passing the object as argument:os.writeObject(mybox2);
but how can i read it? i cannot pass mybox2 because is a local variable created inside the method scrivi() so i guess it is living in the stack and not in the heap, right?
thanks
and please Henry how can i use the scroll function, that the other sherif asked me in the past to not post large piece of code without scrolling