001
014
015 package com.liferay.portal.kernel.process;
016
017 import com.liferay.portal.kernel.util.StreamUtil;
018
019 import java.io.IOException;
020 import java.io.InputStream;
021
022
025 public class EchoOutputProcessor implements OutputProcessor<Void, Void> {
026
027 @Override
028 public Void processStdErr(InputStream stdErrInputStream)
029 throws ProcessException {
030
031 try {
032 StreamUtil.transfer(stdErrInputStream, System.err, false);
033 }
034 catch (IOException ioe) {
035 throw new ProcessException(ioe);
036 }
037
038 return null;
039 }
040
041 @Override
042 public Void processStdOut(InputStream stdOutInputStream)
043 throws ProcessException {
044
045 try {
046 StreamUtil.transfer(stdOutInputStream, System.out, false);
047 }
048 catch (IOException ioe) {
049 throw new ProcessException(ioe);
050 }
051
052 return null;
053 }
054
055 }