Я получаю данные clob из db2 и сохраняю их в списке, а затем записываю в текстовый файл, но символы jappnese не кодируются.
Получение данных из db2
if (rs != null) {
int slNo = 0;
BufferedReader reader = null;
int counter = 0;
// Read the list of content next
while (rs.next() && !rs.isClosed()) {
// Reserve the first entry in the
// result List for header column
if (counter == 0) {
resultList.add(null);
counter++;
}
reader = new BufferedReader(new InputStreamReader(rs.getAsciiStream(1)));
slNo = rs.getInt(2);
if (slNo == 1) {
resultList.set(0, reader.readLine());
} else {
// result data
resultList.add(reader.readLine());
}}}
Запись в файл
FileOutputStream outObjectOutputStream = null;
try {
outObjectOutputStream = new FileOutputStream(absoluteFilePath);
for (String line : resultList) {
if (line != null) {
outObjectOutputStream.write(line.getBytes());
outObjectOutputStream.write("\n".getBytes());
}}'