Class JSONFilter

    • Constructor Detail

      • JSONFilter

        public JSONFilter()
    • Method Detail

      • close

        public void close()
        Description copied from interface: IFilter
        Closes the input document. Developers should call this method from within their code before sending the last event: This can allow writer objects to overwrite the input file when they receive the last event. This method must also be safe to call even if the input document is not opened.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface IFilter
        Overrides:
        close in class AbstractFilter
      • hasNext

        public boolean hasNext()
        Description copied from interface: IFilter
        Indicates if there is an event to process.

        Implementer Note: The caller must be able to call this method several times without changing state.

        Specified by:
        hasNext in interface IFilter
        Specified by:
        hasNext in interface Iterator<Event>
        Returns:
        True if there is at least one event to process, false if not.
      • next

        public Event next()
        Description copied from interface: IFilter
        Gets the next event available. Calling this method can be done only once on each event.
        Specified by:
        next in interface IFilter
        Specified by:
        next in interface Iterator<Event>
        Returns:
        The next event available or null if there are no events.
      • open

        public void open​(RawDocument input)
        Description copied from interface: IFilter
        Opens the input document described in a give RawDocument object. Skeleton information is always created when you use this method.
        Specified by:
        open in interface IFilter
        Parameters:
        input - The RawDocument object to use to open the document.
      • open

        public void open​(RawDocument input,
                         boolean generateSkeleton)
        Description copied from interface: IFilter
        Opens the input document described in a give RawDocument object, and optionally creates skeleton information.
        Specified by:
        open in interface IFilter
        Overrides:
        open in class AbstractFilter
        Parameters:
        input - The RawDocument object to use to open the document.
        generateSkeleton - true to generate the skeleton data, false otherwise.
      • getEncoderManager

        public EncoderManager getEncoderManager()
        Description copied from interface: IFilter
        Gets the EncoderManager object for this filter. This encoder manager should provided the mappings to the different MIME types used by the filter.
        Specified by:
        getEncoderManager in interface IFilter
        Overrides:
        getEncoderManager in class AbstractFilter
        Returns:
        the EncoderManager for this filter.
      • isUtf8Encoding

        protected boolean isUtf8Encoding()
        Description copied from class: AbstractFilter
        Is the input encoded as UTF-8?
        Overrides:
        isUtf8Encoding in class AbstractFilter
        Returns:
        true if the document is in utf8 encoding.
      • isUtf8Bom

        protected boolean isUtf8Bom()
        Description copied from class: AbstractFilter
        Does the input have a UTF-8 Byte Order Mark?
        Overrides:
        isUtf8Bom in class AbstractFilter
        Returns:
        true if the document has a utf-8 byte order mark.
      • handleStart

        public void handleStart()
        Description copied from interface: IJsonHandler
        Called once at the beginning of a new document.
        Specified by:
        handleStart in interface IJsonHandler
      • handleEnd

        public void handleEnd()
        Description copied from interface: IJsonHandler
        Called once at the end of a document.
        Specified by:
        handleEnd in interface IJsonHandler
      • handleObjectStart

        public void handleObjectStart()
        Description copied from interface: IJsonHandler
        Handle json Object: i.e., { "key" : "value" } For contextual information.
        Specified by:
        handleObjectStart in interface IJsonHandler
      • handleListStart

        public void handleListStart()
        Description copied from interface: IJsonHandler
        Handle json List: i.e., [ "value1", "value2" ] For contextual information.
        Specified by:
        handleListStart in interface IJsonHandler