protected static void sendLineToStream(@NotNull OutputStream input, @NotNull String line) throws IOException {
    // Using platform-specific notion of a line separator (PrintStream, PrintWriter, BufferedWriter#newLine()) is
    // unreliable in case of remote interpreters where target and host OS might differ.

    // Closing the underlying input stream should be handled by its owner.
    @SuppressWarnings("IOResourceOpenedButNotSafelyClosed") final BufferedWriter writer =
      new BufferedWriter(new OutputStreamWriter(input, StandardCharsets.UTF_8));
    writer.write(line);
    writer.write('\n');
    writer.flush();
  }
protected static void sendLineToStream(@NotNull OutputStream input, @NotNull String line)