Search This Blog

Tuesday, April 6, 2010

Converting Files of One Encoding To Another Encoding

My design for the SCJD required the use of a FilePropertiesManager for writing and reading application specific properties.
My implementation included a wrapped Properties object that was then read from and written to. The Properties file is "ISO-8859-1" encoded.
One of the step in creating a JUnit test case for this class was to create all the necessary support functions. One such function was to read an "ISO-8859-1" encoded properties file and write that properties file back into one for the many supported encodings.


Here's the test method:




Here's the method:

No comments: