• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

networked file reading and writing

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic