Class OBFLWsNormalizer


  • public class OBFLWsNormalizer
    extends XMLParserBase
    Provides a whitespace normalizer for OBFL-files.
    • Constructor Detail

      • OBFLWsNormalizer

        public OBFLWsNormalizer​(XMLEventReader input,
                                XMLEventFactory eventFactory)
        Creates a new OBFLWsNormalizer.
        Parameters:
        input - the input XMLEventReader. Note that the underlying stream might not be closed after parsing, due to limitations in the StaX implementation.
        eventFactory - the xml event factory
    • Method Detail

      • hasNext

        public boolean hasNext()
      • parse

        public void parse​(XMLOutputFactory outputFactory,
                          OutputStream out)
        Parses for whitespace.
        Parameters:
        outputFactory - an xml output factory
        out - the output stream
      • isWritingOften

        public boolean isWritingOften()
        Returns true if the output stream is updated often.
        Returns:
        true if the output stream is updated often, false otherwise
      • setWritingOften

        public void setWritingOften​(boolean writingOften)
        Sets an intention to write to the output stream often, if true. Since this can affect performance, it is configurable.
        Parameters:
        writingOften - pass true to write often, false otherwise
      • main

        public static void main​(String[] args)
        Parameters:
        args - the arguments