void (@NotNull ProcessHandler processHandler, @NotNull String command) { final OutputStream outputStream = processHandler.getProcessInput(); assert outputStream != null : "output stream is null"; final Charset charset = processHandler instanceof BaseOSProcessHandler ? ((BaseOSProcessHandler)processHandler).getCharset() : null; byte[] bytes = (command + "\n").getBytes(charset != null ? charset : StandardCharsets.UTF_8); try { outputStream.write(bytes); outputStream.flush(); } catch (IOException e) { LOG.warn(e); } }