public void run() {
        try {
            StringBuffer buf = new StringBuffer();
            String line = null;

            while ((line = reader.readLine()) != null) {
                if (identifier != null) {
                    line = identifier + line;
                }

                if (false == StringUtils.isBlank(line)) {
                    buf.append(line).append(SystemUtils.LINE_SEPARATOR);
                }
            }

            out.write(buf.toString().getBytes());
            out.flush();
        } catch (IOException ioe) {
            //ignore
        } finally {
            IOUtils.closeQuietly(reader);
        }
    }
A simple thread that copies one stream to another. Useful for copying a process's output/error streams to this
process's output/error streams.
shared/common/src/main/java/com/alibaba/otter/shared/common/utils/cmd/StreamCopier.java