Class LineEndingProcessingProvider

java.lang.Object
com.github.javaparser.LineEndingProcessingProvider
All Implemented Interfaces:
Provider

public class LineEndingProcessingProvider extends Object implements Provider
Provider un-escaping unicode escape sequences in the input sequence.
  • Field Details

    • EOF

      private static final int EOF
      See Also:
    • DEFAULT_BUFFER_SIZE

      private static final int DEFAULT_BUFFER_SIZE
      See Also:
    • _input

      private final Provider _input
      The "other" provider which we are wrapping around / reading from.
    • _data

      private final char[] _data
      The buffer that we're storing data within.
    • _len

      private int _len
      The number of characters in _data.
    • _pos

      private int _pos
      The position in _data where to read the next source character from.
    • eolCounts

      private final Map<LineSeparator,Integer> eolCounts
  • Constructor Details

    • LineEndingProcessingProvider

      public LineEndingProcessingProvider(Provider input)
    • LineEndingProcessingProvider

      public LineEndingProcessingProvider(int bufferSize, Provider input)
  • Method Details

    • close

      public void close() throws IOException
      Description copied from interface: Provider
      Closes the stream and releases any system resources associated with it.
      Specified by:
      close in interface Provider
      Throws:
      IOException
    • fillBuffer

      private int fillBuffer() throws IOException
      Throws:
      IOException
    • getDetectedLineEnding

      public LineSeparator getDetectedLineEnding()
    • isBufferEmpty

      private boolean isBufferEmpty()
    • nextBufferedChar

      private int nextBufferedChar() throws IOException
      Retrieves the next un-escaped character from the buffered _input.
      Returns:
      The next character or -1 if no more input is available.
      Throws:
      IOException
    • read

      public int read(char[] buffer, int offset, int len) throws IOException
      Description copied from interface: Provider
      Reads characters into an array
      Specified by:
      read in interface Provider
      Parameters:
      buffer - Destination buffer
      offset - Offset at which to start storing characters
      len - The maximum possible number of characters to read
      Returns:
      The number of characters read, or -1 if all read
      Throws:
      IOException