org.zeroturnaround.exec
Class ProcessOutput

java.lang.Object
  extended by org.zeroturnaround.exec.ProcessOutput

public class ProcessOutput
extends Object

Standard output of a finished process.

Author:
Rein Raudjärv
See Also:
ProcessExecutor

Constructor Summary
ProcessOutput(byte[] data)
           
 
Method Summary
 byte[] getBytes()
           
 List<String> getLines()
           
 List<String> getLines(String charset)
           
 List<String> getLinesAsUTF8()
           
 String getString()
           
 String getString(String charset)
           
 String getUTF8()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessOutput

public ProcessOutput(byte[] data)
Method Detail

getBytes

public byte[] getBytes()
Returns:
binary output of the finished process.

getString

public String getString()
Returns:
output of the finished process converted to a String using platform's default encoding.

getUTF8

public String getUTF8()
Returns:
output of the finished process converted to UTF-8 String.

getString

public String getString(String charset)
Parameters:
charset - The name of a supported char set.
Returns:
output of the finished process converted to a String.

getLines

public List<String> getLines()
Returns:
output lines of the finished process converted using platform's default encoding.

getLinesAsUTF8

public List<String> getLinesAsUTF8()
Returns:
output lines of the finished process converted using UTF-8.

getLines

public List<String> getLines(String charset)
Parameters:
charset - The name of a supported char set.
Returns:
output lines of the finished process converted using a given char set.


Copyright © 2015 ZeroTurnaround. All rights reserved.