Package monq.jfa

Interface CharSource

All Known Implementing Classes:
ReaderCharSource, StringCharSource

public interface CharSource
defines the the character source from which automaton matching reads the data.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Resets this to a previously set mark().
    void
    Sets a mark until which we may want to skip back with backToMark() to re-read part of the input.
    int
    returns a single character or -1 to indicate end of file.
  • Method Details

    • read

      int read() throws IOException
      returns a single character or -1 to indicate end of file.
      Throws:
      IOException
    • mark

      void mark()
      Sets a mark until which we may want to skip back with backToMark() to re-read part of the input. The initial mark is always at the start of the input, so that after a call to backToMark the whole CharSource can be re-read.
    • backToMark

      int backToMark()
      Resets this to a previously set mark().