Class InputStreamMarkCursor

java.lang.Object
org.jruby.util.InputStreamMarkCursor

public class InputStreamMarkCursor extends Object
Use mark to make a safe rewindable cursor. This assume you know the stream supports mark().
  • Constructor Details

    • InputStreamMarkCursor

      public InputStreamMarkCursor(InputStream in, int markSize)
  • Method Details

    • read

      public int read() throws IOException
      Throws:
      IOException
    • endPoint

      public void endPoint(int delta)
    • rewind

      public void rewind()
    • finish

      public void finish() throws IOException
      reset back to mark and then read back to endPoint to repoint stream back to where we want next consumer of stream to start reading from.
      Throws:
      IOException
    • reset

      public void reset() throws IOException
      Throws:
      IOException