OutputStreamWriter (OutputStream processInput, ProcessHandler processHandler) { Charset charset = null; if (processHandler instanceof OSProcessHandler) { charset = ((OSProcessHandler)processHandler).getCharset(); } if (charset == null) { charset = EncodingManager.getInstance().getDefaultCharset(); } return new OutputStreamWriter(processInput, charset); }