• Post Reply Bookmark Topic Watch Topic
  • New Topic

File object question

 
Shane Burgel
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one File object that I want to write to and two other File objects representing the files that I want to write. How do I concatinate and write them to the first file object?
 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to read the data from those other files and then write the data to your first file using append mode.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the I/O and Streams forum...
 
Shane Burgel
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Barry Andrews:
You will have to read the data from those other files and then write the data to your first file using append mode.


Right but I don't know what I need to do to make that happen. A reader object of some sort? What kind of writer do I need to make?
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on what kind of data you are working with and how you are using it. See the Java Tutorial on IO Streams for examples.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!