views:

534

answers:

2

I want to write a socket channel program using which I can send a file from the client program to the server program. I want to create this program using Java.

Is there any other on-line help is available So how to overcome this problem.

Thanks Sunil Kumar Sahoo

+2  A: 

Maybe you could clarify you question. Do you just want to send a file in a convenient way? Then I'd strongly recommend some standard protocol, such as SSH File Transfer Protocol. This is much preferrable to using some home-grown code, allows you to use existing solid libraries and makes interoperability with other software easier.

Since you asked specifically about a socket channel program: Is this a homework question? In that case I'd advise you to read the Javadocs for the SocketChannel class, and google a bit for example code using it. If you then still have a problem, post another question with the specific thing you don't understand, and we'll probably help :-).

sleske
+1  A: 

yes u can...

first u need to change the file into bytes...

then from OutputStream ...u can Write the Bytes into the server....

i have a program..if u want i can show u....

Vizay Soni