ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <jesse.gl...@sun.com>
Subject Re: Purpose of FileUtils.close(...)
Date Fri, 28 Jan 2005 02:42:36 GMT
Matt Benson wrote:
> [...] the Exception won't be thrown unless you explicitly sync() the 
> FileDescriptor; otherwise the write will take place in cache and the
> result on disk later will be a zero-byte file. [...]

So close() is not enough, you have to sync()? If true this sounds like a 
bug in the JRE that should be filed as such. Normal application code 
should not have to go around making special low-level calls like this. 
Anyway excessive calls to sync() are likely to be bad for typical 
performance.

-J.

-- 
Jesse Glick <mailto:jesse.glick@sun.com> x22801
NetBeans, Open APIs  <http://www.netbeans.org/>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message