• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

properties out put problem

 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my code
loading property file
props.load( new FileInputStream(propertyfile));
making changes in property file
props.setProperty("name","xyz" );
out putting the proeprty file
File proper = new File(propfile);
FileOutputStream propfileoutput = new FileOutputStream(proper);
props.store(propfileoutput, null);
propfileoutput.close();

the problem
------------------------------------------
the links in the property file
eg:- c:\\temp\\test
is converting to
c\:\\temp\\test
----------------------------------------------
how to avoid this error

thanks in advance
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi kamesh!

Dont worry about that!

In a property-file, there are some characters with a special meaning e.g. = : ! #.

The store-method will escape these characters with a \ eg \: So the load method can interpret the property file correctly.

after re-loading the property file, the content will be right.

Stefan.
[ April 13, 2005: Message edited by: Stefan Willi ]
 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the answer
 
reply
    Bookmark Topic Watch Topic
  • New Topic