| Author |
Reading Properties file with spaces in key
|
Jeffrey Pony
Greenhorn
Joined: Jun 24, 2002
Posts: 25
|
|
Iam currently using jdk1.4. I have a to read a properties file containing text, key = value spaced key = spaced value Can I set the delimiter that is to be used by Properties, in this case I would want only '=' as the delimiter and ignore whilte space between the keys. Is there any way that I can acheive this in my code while creating the Properties object or invoking the load method? Is there any alternate way of reading the key and value? Thanks in advance.
|
 |
Joe Ess
Bartender
Joined: Oct 29, 2001
Posts: 8290
|
|
|
Jeffrey, please do not post the same question in multiple forums. We all read multiple forums so you are not increasing your audiance. It can also cause the community to duplicate effort as we try to answer every question. We're all volunteers here. It may take more than 17 minutes for someone to get around to your question. Please be patient.
|
"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
|
 |
Jeffrey Pony
Greenhorn
Joined: Jun 24, 2002
Posts: 25
|
|
oops, did not intend to cause any extra work. Shall remember that. The way I am currently handling it is, that I am treating the file as just another file. Reading the file using, BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); and then performing String manipulation to get the key and value. Would be interesting to know if it can be acheived by the Properties class without overriding the load method. Is there any way to do it using the API. Thanks.
|
 |
 |
|
|
subject: Reading Properties file with spaces in key
|
|
|