/// <summary> /// Sets the length of the current stream. /// </summary> /// <param name="value">The desired length of the current stream in bytes.</param> public override void SetLength(long value) { if (TheIStream != null) { TheIStream.SetSize(value); } else { TheStream.SetLength(value); } }
/// <summary> /// Changes the size of the stream object. /// </summary> /// <param name="libNewSize">Specifies the new size of the stream as a number of bytes.</param> ///<exception cref="IOException">An I/O error occurs.</exception> ///<exception cref="NotSupportedException">The stream does not support reading.</exception> ///<exception cref="ObjectDisposedException">Methods were called after the stream was closed.</exception> public void SetSize(long libNewSize) { if (TheStream != null) { // Sets the length of the current stream. TheStream.SetLength(libNewSize); } else { TheIStream.SetSize(libNewSize); } }