Class JfrLoaderToolkit


  • public class JfrLoaderToolkit
    extends java.lang.Object
    A Java 1.7 compatible collection of methods used to load binary JFR data into IItemCollection implementations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static IItemCollection loadEvents​(java.io.File file)
      Loads a potentially zipped or gzipped file using the parser extensions loaded from the java service loader
      static IItemCollection loadEvents​(java.io.InputStream stream)
      Loads a potentially zipped or gzipped input stream using the parser extensions loaded from the java service loader
      static IItemCollection loadEvents​(java.io.InputStream stream, java.util.List<? extends IParserExtension> extensions)
      Loads a potentially zipped or gzipped input stream using the parser extensions loaded from the java service loader
      static IItemCollection loadEvents​(java.util.List<java.io.File> files)
      Loads a recording from a sequence of potentially zipped or gzipped files using the parser extensions loaded from the java service loader
      static IItemCollection loadEvents​(java.util.List<java.io.File> files, java.util.List<? extends IParserExtension> extensions)
      Loads a recording from a sequence of potentially zipped or gzipped file using the supplied parser extensions
      private static EventArray[] loadFile​(java.util.List<java.io.File> files, java.util.List<? extends IParserExtension> extensions)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JfrLoaderToolkit

        public JfrLoaderToolkit()
    • Method Detail

      • loadFile

        private static EventArray[] loadFile​(java.util.List<java.io.File> files,
                                             java.util.List<? extends IParserExtension> extensions)
                                      throws java.io.IOException,
                                             CouldNotLoadRecordingException
        Parameters:
        files - the files to read the recording from
        extensions - the extensions to use when parsing the file
        Returns:
        an array of EventArrays (one event type per EventArray)
        Throws:
        java.io.IOException
        CouldNotLoadRecordingException
      • loadEvents

        public static IItemCollection loadEvents​(java.io.InputStream stream)
                                          throws java.io.IOException,
                                                 CouldNotLoadRecordingException
        Loads a potentially zipped or gzipped input stream using the parser extensions loaded from the java service loader
        Parameters:
        stream - the input stream to read the recording from
        Returns:
        the events in the recording
        Throws:
        java.io.IOException
        CouldNotLoadRecordingException
      • loadEvents

        public static IItemCollection loadEvents​(java.io.InputStream stream,
                                                 java.util.List<? extends IParserExtension> extensions)
                                          throws CouldNotLoadRecordingException,
                                                 java.io.IOException
        Loads a potentially zipped or gzipped input stream using the parser extensions loaded from the java service loader
        Parameters:
        stream - the input stream to read the recording from
        extensions - the extensions to use when parsing the file
        Returns:
        the events in the recording
        Throws:
        CouldNotLoadRecordingException
        java.io.IOException
      • loadEvents

        public static IItemCollection loadEvents​(java.io.File file)
                                          throws java.io.IOException,
                                                 CouldNotLoadRecordingException
        Loads a potentially zipped or gzipped file using the parser extensions loaded from the java service loader
        Parameters:
        file - the file to read the recording from
        Returns:
        the events in the recording
        Throws:
        java.io.IOException
        CouldNotLoadRecordingException
      • loadEvents

        public static IItemCollection loadEvents​(java.util.List<java.io.File> files)
                                          throws java.io.IOException,
                                                 CouldNotLoadRecordingException
        Loads a recording from a sequence of potentially zipped or gzipped files using the parser extensions loaded from the java service loader
        Parameters:
        files - the files to read the recording from
        Returns:
        the events in the recording
        Throws:
        java.io.IOException
        CouldNotLoadRecordingException
      • loadEvents

        public static IItemCollection loadEvents​(java.util.List<java.io.File> files,
                                                 java.util.List<? extends IParserExtension> extensions)
                                          throws java.io.IOException,
                                                 CouldNotLoadRecordingException
        Loads a recording from a sequence of potentially zipped or gzipped file using the supplied parser extensions
        Parameters:
        files - the files to read the recording from
        extensions - the extensions to use when parsing the file
        Returns:
        the events in the recording
        Throws:
        java.io.IOException
        CouldNotLoadRecordingException