Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

networked file reading and writing

 
Joseph Siao
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the use of the FileWriter and FileReader object also applicable if Im writing or reading a file from/to a networked computer or a different computer aside from the computer that im running the java code? or do i have to go to socket programming?
 
Oliver Gibbs
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are reading and writing a file, the network file system should be transparent to your application since the appropriate layer of the operating system will handle the inner details. So in answer to your question, yes, using a FileWriter and FileReader object for network-based files should be suffice!
Hope this helps!
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joshep, if you are in LAN is likely that the OS allows you to access files in others computers. If so, FileReader could be used with a file in a shared resource set up previously to the execution of the Java program. But in the Internet we would need socket programming or a FTP client. Look at this post for an example of the former.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic