Package org.zeroturnaround.exec
Class ProcessOutput
- java.lang.Object
-
- org.zeroturnaround.exec.ProcessOutput
-
public class ProcessOutput extends java.lang.ObjectStandard output of a finished process.- See Also:
ProcessExecutor
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]dataProcess output (notnull).
-
Constructor Summary
Constructors Constructor Description ProcessOutput(byte[] data)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()java.util.List<java.lang.String>getLines()java.util.List<java.lang.String>getLines(java.lang.String charset)java.util.List<java.lang.String>getLinesAsUTF8()(package private) static java.util.List<java.lang.String>getLinesFrom(java.lang.String output)java.lang.StringgetString()java.lang.StringgetString(java.lang.String charset)java.lang.StringgetUTF8()
-
-
-
Method Detail
-
getBytes
public byte[] getBytes()
- Returns:
- binary output of the finished process.
-
getString
public java.lang.String getString()
- Returns:
- output of the finished process converted to a String using platform's default encoding.
-
getUTF8
public java.lang.String getUTF8()
- Returns:
- output of the finished process converted to UTF-8 String.
-
getString
public java.lang.String getString(java.lang.String charset)
- Parameters:
charset- The name of a supported char set.- Returns:
- output of the finished process converted to a String.
-
getLines
public java.util.List<java.lang.String> getLines()
- Returns:
- output lines of the finished process converted using platform's default encoding.
-
getLinesAsUTF8
public java.util.List<java.lang.String> getLinesAsUTF8()
- Returns:
- output lines of the finished process converted using UTF-8.
-
getLines
public java.util.List<java.lang.String> getLines(java.lang.String charset)
- Parameters:
charset- The name of a supported char set.- Returns:
- output lines of the finished process converted using a given char set.
-
getLinesFrom
static java.util.List<java.lang.String> getLinesFrom(java.lang.String output)
-
-