OK, here is what seems to be working.
I did some reading and noticed that closing the output stream was an op
that was pretty close to the hardware.
So, when cleaning up, do the following:
fileOutStream.flush();
srcChannel.close ( ) ;
dstChannel.close ( ) ;
fileOutStream.close();
Anyway,
On 5/3/06, Stefaan A Eeckels <[EMAIL PROTECTED]> wrote:
On Wed, 3 May 2006 07:32:10 -0400
"Ioan - Ciprian Tandau" <[EMAIL PROTECTED]> wrote:
> I told him about getFD().sync() (for FileInput/OutputStream and
> RandomFile It seems to be the only way to make sure things are
> synchronously writ
On Wed, 3 May 2006 07:32:10 -0400
"Ioan - Ciprian Tandau" <[EMAIL PROTECTED]> wrote:
> I told him about getFD().sync() (for FileInput/OutputStream and
> RandomFile It seems to be the only way to make sure things are
> synchronously written to disk (local storage).
The fact that the file is ph
I told him about getFD().sync() (for FileInput/OutputStream and
RandomFile It seems to be the only way to make sure things are
synchronously written to disk (local storage).
On 5/3/06, Stefaan A Eeckels <[EMAIL PROTECTED]> wrote:
On Tue, 02 May 2006 14:38:50 -0700
"Jim C." <[EMAIL PROTECTED]
On Tue, 02 May 2006 14:38:50 -0700
"Jim C." <[EMAIL PROTECTED]> wrote:
> Stefaan A Eeckels wrote:
> > On Mon, 01 May 2006 13:41:12 -0700
> > "Jim C." <[EMAIL PROTECTED]> wrote:
> >
> >> Anyone know how a simple file copy can be accomplished in an
> >> explicitly synchronous manner without adding
On Mon, 01 May 2006 13:41:12 -0700
"Jim C." <[EMAIL PROTECTED]> wrote:
> Anyone know how a simple file copy can be accomplished in an
> explicitly synchronous manner without adding Thread.sleep(n) after
> calling flush on the output stream?
Have you tried the streams method from the same site:
h
OK, so I need to do a simple file copy for a unit test. I found a great
code example here:
http://tinyurl.com/kkhju
Problem is:
My test will fail roughly 50% of the time because the test's data file
is not finished copying. I've done everything I can imagine to
accomplish this in a synchro