*/
cmd.add(this.cmd);
cmd.add("stat");
cmd.add("-fe");
cmd.add(basename);
Executor executor = new Executor(cmd, directory);
executor.exec();
String elementID = null;
try (BufferedReader info = new BufferedReader(executor.getOutputReader())) {
String line = info.readLine();
String[] statInfo = line.split("\\s+");
elementID = statInfo[1].substring(2); // skip over 'e:'
} catch (IOException e) {
OpenGrokLogger.getLogger().log(Level.SEVERE,
"Could not obtain status for " + basename);
}
if (elementID != null) {
/*
* ------------------------------------------ This really gets the
* contents of the file.
*------------------------------------------
*/
cmd.clear();
cmd.add(this.cmd);
cmd.add("cat");
cmd.add("-v");
cmd.add(rev.trim());
cmd.add("-e");
cmd.add(elementID);
executor = new Executor(cmd, directory);
executor.exec();
inputStream =
new ByteArrayInputStream(executor.getOutputString().getBytes());
}
return inputStream;
}