/// <summary> /// Repositions this stream to the position at the time the /// <code>mark</code> method was last called on this input stream. /// /// <para> The general contract of <code>reset</code> is: /// /// </para> /// <para><ul> /// /// <li> If the method <code>markSupported</code> returns /// <code>true</code>, then: /// /// <ul><li> If the method <code>mark</code> has not been called since /// the stream was created, or the number of bytes read from the stream /// since <code>mark</code> was last called is larger than the argument /// to <code>mark</code> at that last call, then an /// <code>IOException</code> might be thrown. /// /// <li> If such an <code>IOException</code> is not thrown, then the /// stream is reset to a state such that all the bytes read since the /// most recent call to <code>mark</code> (or since the start of the /// file, if <code>mark</code> has not been called) will be resupplied /// to subsequent callers of the <code>read</code> method, followed by /// any bytes that otherwise would have been the next input data as of /// the time of the call to <code>reset</code>. </ul> /// /// <li> If the method <code>markSupported</code> returns /// <code>false</code>, then: /// /// <ul><li> The call to <code>reset</code> may throw an /// <code>IOException</code>. /// /// <li> If an <code>IOException</code> is not thrown, then the stream /// is reset to a fixed state that depends on the particular type of the /// input stream and how it was created. The bytes that will be supplied /// to subsequent callers of the <code>read</code> method depend on the /// particular type of the input stream. </ul></ul> /// /// </para> /// <para> The method <code>reset</code> for class <code>InputStream</code> /// does nothing and always throws an <code>IOException</code>. /// /// </para> /// </summary> /// <exception cref="IOException"> if this stream has not been marked or if the /// mark has been invalidated. </exception> /// <seealso cref= java.io.InputStream#mark(int) </seealso> /// <seealso cref= System.IO.IOException </seealso> public virtual void reset() { if (fd != null) { fd.reset(); } }