• 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

copying files in jdk 1.1.8

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic