| Author |
help for transfering of IO Stream
|
pang lf
Greenhorn
Joined: Mar 12, 2002
Posts: 1
|
|
this morning,i write a program about file transfering,it be used copy files about 100M from a computer of netware to my computer,my god,it tooks me about 20 minutes,why so slow? what is it relative to?thanks.
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18652
|
|
I'm not sure what a "computer of netware" is. What sort of connection do you have to this computer? It's not, say, a phone modem, is it? Assuming the connection isn't the problem, how are you performing the copy? Probably you should be using a BufferedInputStream and BufferedOutputStream, and using the read(byte[]) and write(byte[], int, int) methods for efficiency. If you're using RandomAccessFile, burn it - it's evil. Or if you're using Java 1.4, you can check out the new java.nio classes, which may be faster - I haven't really tried them yet.
|
"I'm not back." - Bill Harding, Twister
|
 |
 |
|
|
subject: help for transfering of IO Stream
|
|
|