// get iterable for pid looping
boolean singlePID;
Iterable<String> pids = null;
if (pid.startsWith(PROTOCOL_FILE)) {
File pidFile = new File(pid.substring(PROTOCOL_FILE.length()));
pids = new PIDStreamIterableWrapper(new FileInputStream(pidFile));
singlePID = false;
} else { // pid list
String[] pidList = pid.split(",");
pids = new ArrayList<String>(Arrays.asList(pidList));