use of org.apache.geode.internal.sequencelog.model.GraphSet in project geode by apache.
the class GraphReader method readGraphs.
public GraphSet readGraphs(Filter filter, boolean areGemfireLogs) throws IOException {
GraphSet graphs = new GraphSet();
if (areGemfireLogs) {
// TODO - probably don't need to go all the way
// to a binary format here, but this is quick and easy.
HeapDataOutputStream out = new HeapDataOutputStream(Version.CURRENT);
GemfireLogConverter.convertFiles(out, files);
InputStreamReader reader = new InputStreamReader(out.getInputStream());
reader.addToGraphs(graphs, filter);
} else {
for (File file : files) {
FileInputStream fis = new FileInputStream(file);
InputStreamReader reader = new InputStreamReader(fis);
reader.addToGraphs(graphs, filter);
}
}
graphs.readingDone();
return graphs;
}
Aggregations