Re: Copying File


2005-02-13 08:08:08 AM
jbuilder24
Ata Ebrahimi wrote:
Quote
I wrote codes below and 2 compiler error occured.

why ?

how do I close fileIn, FileOut ?

and u know it's very slow , how do I make it faster ?
The reason you can't close the files is that the close() method is a
member of FileInputStream/FileOutputStream and your objects are of
types DataInput/DataOutput, which do not support that method.
A quick Google search for "java file copy" (minus the quotes) yields
the following:
www.rgagnon.com/javadetails/java-0064.html
Study the code; there are some good techniques there for buffering file
I/O.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
www.datadevelopment.com/
Please see Borland's newsgroup guidelines at
info.borland.com/newsgroups/guide.html