retval = new OutputStreamWriter(os, enc);
} else {
retval = new OutputStreamWriter(os);
}
} catch (IOException e) {
addStatus(new ErrorStatus("Error initializing output writer.", this, e));
if (enc != null) {
addStatus(new ErrorStatus("Unsupported encoding?", this));
}
}
return retval;
}