• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading file from a client

 
Chandhrasekar Saravanan
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
i like my client to send file as an input in the command line argument and want my server to receive that inputfile. as the socket class has only socket.getInputStream(). how could my client read the file from the commandline argument?

is there an way?
Thanks
 
Its Just Me
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the "File"-class, you could open the file that is supplied as an argument and using the proper filereader, you could read the data from the file as a bytestream and write this to the output, therefore to your server.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am I missing something? My Socket class also has a getOutputStream().
- Peter
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!