C# Class CmisSync.Lib.Streams.OffsetStream

Offset stream provides the possibility to simulate a longer stream with a virtual empty space at the beginning with the size of offset.
Inheritance: StreamWrapper
Datei anzeigen Open project: OpenDataSpace/CmisSync Class Usage Examples

Public Methods

Method Description
OffsetStream ( Stream stream, long offset ) : System

Initializes a new instance of the CmisSync.Lib.Streams.OffsetStream class.

Seek ( long offset, SeekOrigin origin ) : long

Seek the specified offset based on the given origin position.

SetLength ( long length ) : void

Sets the length to the given length. It must be greater than the Offset

Method Details

OffsetStream() public method

Initializes a new instance of the CmisSync.Lib.Streams.OffsetStream class.
public OffsetStream ( Stream stream, long offset ) : System
stream Stream /// Stream which should be used after the given offset. ///
offset long /// Size of the empty offset. ///
return System

Seek() public method

Seek the specified offset based on the given origin position.
public Seek ( long offset, SeekOrigin origin ) : long
offset long /// Offset. ///
origin SeekOrigin /// Origin. ///
return long

SetLength() public method

Sets the length to the given length. It must be greater than the Offset
public SetLength ( long length ) : void
length long /// The new Length ///
return void