CanBeZeroStream

Namespace: UAssetAPI

Pass-through stream for detecting non-zero byte writes for CanBeZero.

public class CanBeZeroStream : System.IO.Stream, System.IDisposable, System.IAsyncDisposable

Inheritance ObjectMarshalByRefObjectStreamCanBeZeroStream
Implements IDisposable, IAsyncDisposable

Fields

InnerStream

public Stream InnerStream;

HasWrittenNonZero

public bool HasWrittenNonZero;

Properties

Position

public long Position { get; set; }

Property Value

Int64

Length

public long Length { get; }

Property Value

Int64

CanRead

public bool CanRead { get; }

Property Value

Boolean

CanSeek

public bool CanSeek { get; }

Property Value

Boolean

CanWrite

public bool CanWrite { get; }

Property Value

Boolean

CanTimeout

public bool CanTimeout { get; }

Property Value

Boolean

ReadTimeout

public int ReadTimeout { get; set; }

Property Value

Int32

WriteTimeout

public int WriteTimeout { get; set; }

Property Value

Int32

Constructors

CanBeZeroStream(Stream)

public CanBeZeroStream(Stream innerStream)

Parameters

innerStream Stream

Methods

Read(Byte[], Int32, Int32)

public int Read(Byte[] buffer, int offset, int count)

Parameters

buffer Byte[]

offset Int32

count Int32

Returns

Int32

Write(Byte[], Int32, Int32)

public void Write(Byte[] buffer, int offset, int count)

Parameters

buffer Byte[]

offset Int32

count Int32

Flush()

public void Flush()

Seek(Int64, SeekOrigin)

public long Seek(long offset, SeekOrigin origin)

Parameters

offset Int64

origin SeekOrigin

Returns

Int64

SetLength(Int64)

public void SetLength(long value)

Parameters

value Int64

Dispose(Boolean)

protected void Dispose(bool disposing)

Parameters

disposing Boolean

ReadAsync(Byte[], Int32, Int32, CancellationToken)

public Task<int> ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)

Parameters

buffer Byte[]

offset Int32

count Int32

cancellationToken CancellationToken

Returns

Task<Int32>

WriteAsync(Byte[], Int32, Int32, CancellationToken)

public Task WriteAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)

Parameters

buffer Byte[]

offset Int32

count Int32

cancellationToken CancellationToken

Returns

Task

FlushAsync(CancellationToken)

public Task FlushAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task