Originally posted by Nikos Katsikanis:
where does the ObjectOutPutStream save by defult
There is no default. If you look at the API docs for ObjectOutputStream, you will see that the no-arg constructor is protected. This means it can only be used by subclasses which will then provide the location or other means to specify it. If you are creating an ObjectOutputStream directly, you must use the constructor that thakes a OutputStream as a parameter. I suggest that you look at the API link in my signature and become familiar with the information there. It is an invaluable tool as a Java programmer.
Originally posted by Ulf Dittmer:
To construct an ObjectOutputStream, you need to provide an OutputStream, which -unless you're using ByteArrayOutputStream- is based on a File object. That File object specifies where the OOS will write to.
That isn't entirely accurate. I can think of several ways to obtain an OutputStream that isn't based on a File object:
Since you can extend OutputStream, there are plenty of other options as well with a custom implementation. I can imagine a lot of situations where OutputStream is not based on an underlying file.
[ March 07, 2006: Message edited by: Layne Lund ]