Class CdrFileProcessor


  • public class CdrFileProcessor
    extends Object
    Reads the records (header, binary CDR, text CDR, footer) in a CdrFile formatted as a CdrFileFormat.proto. Invokes the provided CdrProcessors to process encountered records.
    • Constructor Detail

      • CdrFileProcessor

        public CdrFileProcessor​(String path,
                                boolean continueOnFailure,
                                int sizeLimit,
                                CdrProcessor... processors)
                         throws IOException
        Constructs a CDR file processor to process provided file using specified CdrProcessors.
        Parameters:
        path - denotes a path to binary CDR file to process.
        continueOnFailure - should processing continue after error decoding a record or exception thrown by CdrProcessor.
        sizeLimit - maximum file size in bytes to be processed, value of zero or less results in using the default of 64 MB.
        processors - CdrProcessors invoked to process encountered records.
        Throws:
        IOException - if an input or output error occurs when opening CDR file.
    • Method Detail

      • process

        public void process()
                     throws IOException
        Process the binary CDR file.
        Throws:
        IOException - if an input or output error occurs or CDR file does not adhere to expected format.