Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

copying files in jdk 1.1.8

 
Iram Imtiaz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I used jdk 1.2 to write a code that copies file from the server to the client, using the createNewFile() method. Now I have to port the code to jdk 1.1.8 where this function (to the best of my knowledge) is not available. Can someone please identify what is the equivalent? I have looked thru the 1.1.8 API but I think I am missing the solution.
Any help will be appreciated.
Thanks
 
Matt Senecal
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may work:
Create a File object that points to the file you want to copy, and another File object that points to the file you want to copy to. Create a FileInputStream for the file to be copied, and a FileOutputStream for the file to be copied to. Then you can read() bytes from one and write() bytes to the other.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic