* @return The memory used by the Office.
*/
private int getOfficeMemoryUsage() {
String command = sMemoryMonitor.replaceAll("<processID>", getOfficeProcessID());
writeExecutableFile(sOfficeMemoryCommand, command);
ProcessHandler processID = new ProcessHandler(sOfficeMemoryCommand);
processID.executeSynchronously();
String text = processID.getOutputText();
if (text == null || text.equals("") || text.indexOf(' ') == -1) {
failed("Could not determine Office memory usage. Check " + sOfficeMemoryCommand);
}
StringTokenizer aToken = new StringTokenizer(text);
// this works, because the output of pmap is quite standardized.