This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Reading file from a client Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Reading file from a client" Watch "Reading file from a client" New topic
Author

Reading file from a client

Chandhrasekar Saravanan
Ranch Hand

Joined: Jun 16, 2002
Posts: 57
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

Joined: Jan 10, 2002
Posts: 21
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

Joined: Apr 20, 2000
Posts: 3252
Am I missing something? My Socket class also has a getOutputStream().
- Peter
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Reading file from a client
 
Similar Threads
RMI Server
How to configure the Cofiguration file in spring if we want to decide at run time which child object
B&S: How to use suncertify.properties ?
Help needed with submission
Is it possible to initialize a no-interface Stateful bean through annotation?