Table of Contents

Class PartialWrapperStream

Namespace
Amazon.Runtime.Internal.Util
Assembly
AWSSDK.Core.dll

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

stream Stream
partSize long

Properties

Length

Gets the length in bytes of the stream.

public override long Length { get; }

Property Value

long

Position

Gets or sets the position within the current stream.

public override long Position { get; set; }

Property Value

long

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 int
count int
callback AsyncCallback
state object

Returns

IAsyncResult

BeginWrite(byte[], int, int, AsyncCallback, object)

public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)

Parameters

buffer byte[]
offset int
count int
callback AsyncCallback
state object

Returns

IAsyncResult

EndRead(IAsyncResult)

public override int EndRead(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

Returns

int

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

buffer byte[]
offset int
count int

Returns

int

Seek(long, SeekOrigin)

public override long Seek(long offset, SeekOrigin origin)

Parameters

offset long
origin SeekOrigin

Returns

long

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

buffer byte[]
offset int
count int

WriteByte(byte)

public override void WriteByte(byte value)

Parameters

value byte