File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes help for transfering of IO Stream Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "help for transfering of IO Stream" Watch "help for transfering of IO Stream" New topic
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
 
IntelliJ Java IDE
 
subject: help for transfering of IO Stream
 
Threads others viewed
stateful session EJB 3 question
validity of Coupen???
RequestDispatcher
path trouble
Help Regarding Samsung D500
IntelliJ Java IDE