aspose file tools*
The moose likes Beginning Java and the fly likes Properties class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Properties class" Watch "Properties class" New topic
Author

Properties class

Tal Goldstein
Greenhorn

Joined: Apr 16, 2006
Posts: 14
Hi
im using the Properties class to load a configuration file.
when using getProperty(p) im getting the value for property p in the file.
but if i have several values for this property then it returns it in this format: "value1, value2, value3" (exactly as it is in the config file).

does anyone knows if there's some feature that can convert this string into a List, or an array, or something like that?

of course i can parse that string myself and seperate it but im looking for a more elegant way.

Thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19785
    
  20

String.split?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Tal Goldstein
Greenhorn

Joined: Apr 16, 2006
Posts: 14
exactly what i was looking for..
i was digging inside Properties, instead of just looking for what the String API has to offer..

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Properties class