question: private void handleEndOfStream ( State state , InnerState innerState ) throws StopRequest { mInfo . mCurrentBytes = innerState . mBytesSoFar ; mDB . updateDownload ( mInfo ) ; boolean lengthMismatched = ( innerState . mHeaderContentLength != null ) && ( innerState . mBytesSoFar != Integer . parseInt ( innerState . mHeaderContentLength ) ) ; if ( lengthMismatched ) { if ( cannotResume ( innerState ) ) { throw new StopRequest ( DownloaderService . STATUS_CANNOT_RESUME , "mismatched content length" ) ; } else { throw new StopRequest ( getFinalStatusForHttpError ( state ) , "closed socket before end of file" ) ; } } }
target:  Called when we've reached the end of the HTTP response stream, to update the database and check for consistency.