Package org.jruby.util
Class InputStreamMarkCursor
java.lang.Object
org.jruby.util.InputStreamMarkCursor
Use mark to make a safe rewindable cursor. This assume you know
the stream supports mark().
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate byte[]private intprivate intprivate final InputStreamprivate final int -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
in
-
i
private int i -
markSize
private final int markSize -
actualReadTotal
private int actualReadTotal -
buf
private byte[] buf -
endPoint
private int endPoint
-
-
Constructor Details
-
InputStreamMarkCursor
-
-
Method Details
-
read
- Throws:
IOException
-
endPoint
public void endPoint(int delta) -
rewind
public void rewind() -
finish
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
- Throws:
IOException
-