<commit_before>package hudson.remoting;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;

/**
 * {@link OutputStream} that can be sent over to the remote {@link Channel},
 * so that the remote {@link Callable} can write to a local {@link OutputStream}.
 *
 * <h2>Usage</h2>
 * <pre>
 * final OutputStream out = new RemoteOutputStream(os);
 *
 * channel.call(new Callable() {
 *   public Object call() {
 *     // this will write to 'os'.
 *     out.write(...);
 *   }<commit_msg>doc improvement.<commit_after>package hudson.remoting;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;

/**
 * {@link OutputStream} that can be sent over to the remote {@link Channel},
 * so that the remote {@link Callable} can write to a local {@link OutputStream}.
 *
 * <h2>Usage</h2>
 * <p>
 * To have a remote machine write to a local {@link OutputStream}:
 * <pre>
 * final OutputStream out = new RemoteOutputStream(os);
 *
 * channel.call(new Callable() {
 *   public Object call() {
 *     // this will write to 'os'.
 *     out.write(...);
 *   }
 * });
 * </pre>
 *
 * <p>
 * To have a local machine write to a remote {@link OutputStream}:
 *
 * <pre>
 * OutputStream os = channel.call(new Callable() {
 *   public Object call() {
 *       OutputStream os = new FileOutputStream(...); // or any other OutputStream
 *       return new RemoteOutputStream(os);
 *   }
{'fraction_non_alphanumeric': 0.13966836734693877, 'fraction_numerical': 0.002551020408163265, 'mean_word_length': 3.5478260869565217, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2491223', 'n_tokens_mistral': 475, 'n_tokens_neox': 470, 'n_words': 155}