/// <exception cref="System.Exception"/> private static bool CheckPrintAllValues(JMXGet jmx) { int size = 0; byte[] bytes = null; string pattern = "List of all the available keys:"; PipedOutputStream pipeOut = new PipedOutputStream(); PipedInputStream pipeIn = new PipedInputStream(pipeOut); Runtime.SetErr(new TextWriter(pipeOut)); jmx.PrintAllValues(); if ((size = pipeIn.Available()) != 0) { bytes = new byte[size]; pipeIn.Read(bytes, 0, bytes.Length); } pipeOut.Close(); pipeIn.Close(); return(bytes != null?Sharpen.Runtime.GetStringForBytes(bytes).Contains(pattern) : false); }