/** consume() ahead until p==index; can't just set p=index as we must * update line and charPositionInLine. */ @Override public void seek(int index) { if ( index<=p ) { p = index; // just jump; don't update stream state (line, ...) return; } // seek forward, consume until p hits index while ( p<index ) { consume(); } }
/** consume() ahead until p==index; can't just set p=index as we must * update line and charPositionInLine. */ @Override public void seek(int index) { if ( index<=p ) { p = index; // just jump; don't update stream state (line, ...) return; } // seek forward, consume until p hits index while ( p<index ) { consume(); } }
/** consume() ahead until p==index; can't just set p=index as we must * update line and charPositionInLine. */ @Override public void seek(int index) { if ( index<=p ) { p = index; // just jump; don't update stream state (line, ...) return; } // seek forward, consume until p hits index while ( p<index ) { consume(); } }
/** consume() ahead until p==index; can't just set p=index as we must * update line and charPositionInLine. */ public void seek(int index) { if ( index<=p ) { p = index; // just jump; don't update stream state (line, ...) return; } // seek forward, consume until p hits index while ( p<index ) { consume(); } }
/** consume() ahead until p==index; can't just set p=index as we must * update line and charPositionInLine. */ @Override public void seek(int index) { if ( index<=p ) { p = index; // just jump; don't update stream state (line, ...) return; } // seek forward, consume until p hits index while ( p<index ) { consume(); } }
/** consume() ahead until p==index; can't just set p=index as we must * update line and charPositionInLine. */ @Override public void seek(int index) { if ( index<=p ) { p = index; // just jump; don't update stream state (line, ...) return; } // seek forward, consume until p hits index while ( p<index ) { consume(); } }