public void reset ( ) throws IOException { abortIfNeeded ( ) ; if ( bytesReadPastMark <= bufferSize ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Reset after reading " + bytesReadPastMark + " bytes." ) ; } bufferOffset = 0 ; } else { throw new IOException ( "Input stream cannot be reset as " + this . bytesReadPastMark + " bytes have been written, exceeding the available buffer size of " + this . bufferSize ) ; } }
Resets the input stream to the beginning by pointing the buffer offset to the beginning of the available data buffer .