Ok here's the problem, we have an Oracle database encoding data in ISO-8859-1 (aka Latin-1) and Java using UTF-16BE internally for the String class. We need to maintain Latin-1 across our entire process
Our process goes like this:
Get a list of document ids
For each doc id execute SQL query against Oracle for document meta data
For each record retrieve a specific string column and concatenate the results as we move through the recordset.
Store the result in a Hashtable and execute the next query
Combine results from Hashtable with List array containing a template
Write the result to a file.
Get the next document
I'm looking at treating all the strings as BufferedReader and using the ResultSet.getCharacterStream to retrieve the data, but I'm at a loss as to how to manage the Hashtable / List content and these pieces are critical to the operation. If I store the content as a String then Java will use UTF-16 and convert the data. I can't have that happen as the data needs to stay in the Latin-1 format from Oracle.
Any ideas?