InputStreamReader reader = new InputStreamReader(new BufferedInputStream(new FileInputStream(file))); reader.addToGraphs(new GraphReaderCallback() {
InputStreamReader reader = new InputStreamReader(new BufferedInputStream(new FileInputStream(file))); reader.addToGraphs(new GraphReaderCallback() {
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; } }
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; } }