NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

BufferedStream.Seek

Sets the position within the current buffered stream.

[Visual Basic]
Overrides Public Function Seek( _
   ByVal offset As Long, _
   ByVal origin As SeekOrigin _
) As Long
[C#]
public override long Seek(
   long offset,
   SeekOrigin origin
);
[C++]
public: override __int64 Seek(
   __int64 offset,
   SeekOrigin origin
);
[JScript]
public override function Seek(
   offset : long,
   origin : SeekOrigin
) : long;

Parameters

offset
A byte offset relative to origin.
origin
A field of SeekOrigin indicating the reference point from which the new position is to be obtained.

Return Value

The new position within the current buffered stream.

Exceptions

Exception Type Condition
IOException The stream is not open or is null.
NotSupportedException The stream does not support seeking.
EndOfStreamException Seeking was attempted beyond the length of a stream that does not support this.

Remarks

If offset is negative, the new position will precede the position specified by origin by the number of bytes specified by offset. If offset is zero, the new position will be the position specified by origin. If offset is positive, the new position will follow the position specified by origin by the number of bytes specified by offset.

Note that some streams may support positioning beyond the length of the stream; others may throw an exception.

See Also

BufferedStream Class | BufferedStream Members | System.IO Namespace