The Artima Developer Community
Sponsored Link

Java Answers Forum
file

3 replies on 1 page. Most recent reply: Apr 16, 2002 4:40 AM by Thomas SMETS

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Maysoon

Posts: 64
Nickname: hm
Registered: Mar, 2002

file Posted: Apr 15, 2002 12:22 AM
Reply to this message Reply
Advertisement
how can i send a file from client to server via sockets?is it possible or not?


Thomas SMETS

Posts: 307
Nickname: tsmets
Registered: Apr, 2002

Re: file Posted: Apr 15, 2002 12:28 AM
Reply to this message Reply
Yeap !
Just provide the implementation of the java.io.Serializable. See the API's docs.
I would suggest you to Test the code with JUnit to make sure it works fine !
Also beware that you may sometime have troubles with firewall. Implementaion is pretty straight forward, though.

Thomas,

Maysoon

Posts: 64
Nickname: hm
Registered: Mar, 2002

Re: file Posted: Apr 15, 2002 1:26 PM
Reply to this message Reply
hello..

ok i have already used java.io.Serializable
in my chatting program ,but is there a ready function
that allow me to send any sort of file (image,text,...) not byte by byte,but sending the
complete file at once ?
thanks..

Thomas SMETS

Posts: 307
Nickname: tsmets
Registered: Apr, 2002

Re: file Posted: Apr 16, 2002 4:40 AM
Reply to this message Reply
Well either you serialize it your self, or you use smthg like HTTP or you own (custom made) protocole ...

There is not 200 conceptual possibilities !

Thomas,

Flat View: This topic has 3 replies on 1 page
Topic: Array of Array Previous Topic   Next Topic Topic: how do I create an upload page in Java?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use