Class ProcessOutput

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

public class ProcessOutput extends Object
Standard output of a finished process.
See Also:
  • Field Details

    • data

      private final byte[] data
      Process output (not null).
  • Constructor Details

    • ProcessOutput

      public ProcessOutput(byte[] data)
  • Method Details

    • 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.
    • getLinesFrom

      static List<String> getLinesFrom(String output)