• 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

Compile, running OK but no result

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.
I want to create a program that writes the names of all locales to a file :

the class is compiled and run without any problem, but checking AllLocales.txt file, it contains nothing.
any ideas why ??
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The idea behind a BufferedWriter is that it groups a series of small IO operations, into a single large operation. It is usually more efficient to do a single large operation than several small operations if the overhead of doing an operation is high (as it is with IO). However, if you have not placed enough information in the buffer to cause it to automatically empty, you must do so manually with a call to the flush() method before your program terminates. Failure to do so will cause the data in the buffer to be lost.
It is a good practice to always call flush() and close() when you are done with a stream.
 
reply
    Bookmark Topic Watch Topic
  • New Topic