hi everyone...... i have recently create a program that transmit and receive files in a LAN(Local Area Network). The LAN enable me to transfer 100Mbps(MegaBits per seconds). but the tranferring speed was much slower than i drap & drop from the windows..... at 1st i read using DataInputStream i only read and write 1 byte at a time only....but i try with 8 bytes the file may have error at the other side.....1 byte is much more safer.... can anyone tell me why.....??? and anyway to speed up.....
hi, ho fast was it ? try create a small prog which writes a files, counts the bytes and takes the time. then you can calculate the speed. the 100Mbps is a theoretically maximum ! youll never reach that in a real network enviroment due to other traffic, colision, retrys.... what does the network look like ? how many machines, routers, hubs.... is everithing 100Mbps capable ?are the card set to 100Mbps ? so if you get close to the limit i think this is still good. but if you miss this limit by factors, then something is wrong. bye, hope this gives you some ideas wher to look. karl
Are you using BufferedInputStream and BufferedOutputStream? These will often improve efficiency considerably. Also it will help if you use the methods for reading/writing an array of bytes, rather than one byte at a time. It sounds like your attempt to write 8 bytes at a time had a bug in it - it's worth your time to figure out what the bug was. My guess is that if you're assuming that there should always be 8 bytes in each read, then you'll have problems at the end of a file if the total size is not a multiple of 8. You should be able to read/write a variable number of bytes - the read(byte) method tells you how many bytes it successfully read, so use this info. Good luck.
"I'm not back." - Bill Harding, Twister
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com