• Post Reply Bookmark Topic Watch Topic
  • New Topic

FileInputStream password problem  RSS feed

 
Juzer Ali
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I'm using FileInputStream to access a file located on a network machine but the network machine requires authentication first.

How can I use my id and password with the FileInputStream to access the network location?

Please help.

Thanks
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too difficult a question for "beginning Java". Moving thread.
 
Rob Spoor
Sheriff
Posts: 20898
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use JCIFS. It has handled this problem. Instead of using File you would use SmbFile, and instead of using FileInputStream you would be using the InputStream returned by SmbFile's getInputStream() method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!