Class DefaultCharInputReader

java.lang.Object
com.univocity.parsers.common.input.AbstractCharInputReader
com.univocity.parsers.common.input.DefaultCharInputReader
All Implemented Interfaces:
CharInput, CharInputReader

public class DefaultCharInputReader extends AbstractCharInputReader
A default CharInputReader which only loads batches of characters when requested by the AbstractCharInputReader through the reloadBuffer() method.
  • Field Details

    • reader

      private Reader reader
    • unwrapping

      private boolean unwrapping
  • Constructor Details

    • DefaultCharInputReader

      public DefaultCharInputReader(char normalizedLineSeparator, int bufferSize, int whitespaceRangeStart, boolean closeOnStop)
      Creates a new instance with the mandatory characters for handling newlines transparently. Line separators will be detected automatically.
      Parameters:
      normalizedLineSeparator - the normalized newline character (as defined in Format.getNormalizedNewline()) that is used to replace any lineSeparator sequence found in the input.
      bufferSize - the buffer size used to store characters read from the input.
      whitespaceRangeStart - starting range of characters considered to be whitespace.
      closeOnStop - indicates whether to automatically close the input when stop() is called
    • DefaultCharInputReader

      public DefaultCharInputReader(char[] lineSeparator, char normalizedLineSeparator, int bufferSize, int whitespaceRangeStart, boolean closeOnStop)
      Creates a new instance with the mandatory characters for handling newlines transparently.
      Parameters:
      lineSeparator - the sequence of characters that represent a newline, as defined in Format.getLineSeparator()
      normalizedLineSeparator - the normalized newline character (as defined in Format.getNormalizedNewline()) that is used to replace any lineSeparator sequence found in the input.
      bufferSize - the buffer size used to store characters read from the input.
      whitespaceRangeStart - starting range of characters considered to be whitespace.
      closeOnStop - indicates whether to automatically close the input when stop() is called
  • Method Details