Converter { @SuppressFBWarnings("NP_LOAD_OF_KNOWN_NULL_VALUE") public static SampleNode load(final File file) throws IOException { try (InputStream fis = newInputStream(file)) { return load(fis); } } private  Converter(); static String createLabeledSsdump2FileName(final String baseFileName, final String label); static String getLabelFromSsdump2FileName(final String fileName); static SampleNode convert(final Iterator<StackSampleElement> samples); static void save(final File file, final SampleNode collected); @SuppressFBWarnings("NP_LOAD_OF_KNOWN_NULL_VALUE") static SampleNode load(final File file); static SampleNode load(@WillNotClose final InputStream fis); static void saveLabeledDumps(final File file, final Map<String, SampleNode> pcollected); @SuppressFBWarnings("NP_LOAD_OF_KNOWN_NULL_VALUE") static Map<String, SampleNode> loadLabeledDumps(final File file); static void loadLabels(final File file, final Consumer<String> labalsConsumer); @SuppressFBWarnings("NP_LOAD_OF_KNOWN_NULL_VALUE") @Nullable static SampleNode loadLabeledDump(final File file, final String label);  }
@Test public void testLoad() throws IOException { Map<String, SampleNode> labeledDumps = Converter.loadLabeledDumps(new File("./src/test/resources/test.ssdump3")); Assert.assertNotNull(labeledDumps); LOG.debug("dumps", labeledDumps); Assert.assertThat(labeledDumps.toString(), Matchers.containsString("getUnchecked@org.spf4j.concurrent.UnboundedLoadingCache")); }