R
Rhino
What happens to a file if a Java application opens it, writes to it, but
then ends without closing the file?
I've got a file that is having lines appended to it via one of my programs.
However, some of the things that I should be seeing in the file aren't
there. I've also found that I can't delete the file because Windows says
that it is "in use", even though no other application should be touching it
and my program has ended. In certain cases, I suspect that the file is not
being closed by my program so I wonder if that could explain the behaviour
I'm seeing.
Can anyone enlighten me on this?
--
Rhino
---
rhino1 AT sympatico DOT ca
"There are two ways of constructing a software design. One way is to make it
so simple that there are obviously no deficiencies. And the other way is to
make it so complicated that there are no obvious deficiencies." - C.A.R.
Hoare
then ends without closing the file?
I've got a file that is having lines appended to it via one of my programs.
However, some of the things that I should be seeing in the file aren't
there. I've also found that I can't delete the file because Windows says
that it is "in use", even though no other application should be touching it
and my program has ended. In certain cases, I suspect that the file is not
being closed by my program so I wonder if that could explain the behaviour
I'm seeing.
Can anyone enlighten me on this?
--
Rhino
---
rhino1 AT sympatico DOT ca
"There are two ways of constructing a software design. One way is to make it
so simple that there are obviously no deficiencies. And the other way is to
make it so complicated that there are no obvious deficiencies." - C.A.R.
Hoare