I m very new to Client/Server Programming and wants a help from u all that if any one can help me to share some Code that how can we send Files from one PC to another.
Thanks in Advance.
I m very new to Client/Server Programming and wants a help from u all that if any one can help me to share some Code that how can we send Files from one PC to another.
Thanks in Advance.
You have to implement some protocol: suppose you want to send a file to me.
I have to store it somewhere on a disk, so at least you have to send me the
name of the file; preferably before you're sending the contents of that file. If you
want to help me a bit you'll send the number of bytes I'm expected to receive.
Then you send me the content (the bytes) of the file. I can take care of the rest
then. This is just a very primitive protocol that doesn't know how to handle
errors of any form, but it's a start.
Hi to all ,
Actually I m New To Java IO and Unable to make a programme for sending a file to Remote pc from my machine.
So plz give me some Suggestion that how can i do the same.
You have to implement some protocol: suppose you want to send a file to me.
I have to store it somewhere on a disk, so at least you have to send me the
name of the file; preferably before you're sending the contents of that file. If you
want to help me a bit you'll send the number of bytes I'm expected to receive.
Then you send me the content (the bytes) of the file. I can take care of the rest
then. This is just a very primitive protocol that doesn't know how to handle
errors of any form, but it's a start.
kind regards,
Jos
Thanks Dear For ur Reply,
But which Method or which Class i can use To send The File?
For Example as i know about all these is that
May i have to Use Datagram to send the File? or something Else?
By which method i can send the Name of the file over network? or by which method i can send the Data?
And how will u Recieve the Data and file Name on your Side bcz i have to code for Server Also
But which Method or which Class i can use To send The File?
For Example as i know about all these is that
May i have to Use Datagram to send the File? or something Else?
By which method i can send the Name of the file over network? or by which method i can send the Data?
And how will u Recieve the Data and file Name on your Side bcz i have to code for Server Also
Here is an old FAQ on Java network programming. It might help clear out some issues for you and may give you a start.
Comment