Class RewindableReader

java.lang.Object
java.io.Reader
org.camunda.spin.impl.util.RewindableReader
All Implemented Interfaces:
Closeable, AutoCloseable, Readable

public class RewindableReader extends Reader
Caches the initial characters that are read from the supplied Reader and allows to rewind these. As soon as more than size characters have been read, rewinding fails.
Author:
Thorben Lindhauer
  • Field Details

    • wrappedReader

      protected PushbackReader wrappedReader
    • buffer

      protected char[] buffer
    • pos

      protected int pos
    • rewindable

      protected boolean rewindable
  • Constructor Details

    • RewindableReader

      public RewindableReader(Reader input, int size)
  • Method Details