Class PartialWrapperStream
This class is used to wrap a stream for a particular segment of a stream. It makes that segment look like you are reading from beginning to end of the stream.
public class PartialWrapperStream : WrapperStream, IDisposable, IAsyncDisposable
- Inheritance
-
PartialWrapperStream
- Implements
- Inherited Members
Constructors
PartialWrapperStream(Stream, long)
public PartialWrapperStream(Stream stream, long partSize)
Parameters
Properties
Length
Gets the length in bytes of the stream.
public override long Length { get; }
Property Value
Position
Gets or sets the position within the current stream.
public override long Position { get; set; }
Property Value
Methods
BeginRead(byte[], int, int, AsyncCallback, object)
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
Parameters
buffer
byte[]offset
intcount
intcallback
AsyncCallbackstate
object
Returns
BeginWrite(byte[], int, int, AsyncCallback, object)
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
Parameters
buffer
byte[]offset
intcount
intcallback
AsyncCallbackstate
object
Returns
EndRead(IAsyncResult)
public override int EndRead(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResult
Returns
EndWrite(IAsyncResult)
public override void EndWrite(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResult
Read(byte[], int, int)
public override int Read(byte[] buffer, int offset, int count)
Parameters
Returns
Seek(long, SeekOrigin)
public override long Seek(long offset, SeekOrigin origin)
Parameters
offset
longorigin
SeekOrigin
Returns
SetLength(long)
public override void SetLength(long value)
Parameters
value
long
Write(byte[], int, int)
public override void Write(byte[] buffer, int offset, int count)
Parameters
WriteByte(byte)
public override void WriteByte(byte value)
Parameters
value
byte