• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get File name using FileInputStream  RSS feed

 
Kaleeswaran Karuppusamy
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to get the file name which is written in outputstream on client side and get it in inputstream in server side using socket programming.now i want to know the file name of the input stream in server side.how to know the file name

is it possible ?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid I can't follow precisely what you're asking, but: there's no way to get the filename that a FileOutputStream or FileInputStream is connected to, even within a single JVM; it's doubly impossible in a client/server situation.

If your server needs to know the name of a file being sent by a client, then the client should send the filename first.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!