SubStream
- Namespace: Turian.Engine.Core
- Source File: SubStream.cs
A read-only stream that exposes a bounded segment of an underlying stream, starting at the underlying stream's current position. Disposing this stream also disposes the underlying stream. Used to hand out a single asset blob from within a package file without copying it or loading the rest of the file.
Properties
CanRead
(bool)
CanSeek
(bool)
CanWrite
(bool)
Length
(long) = length
Position
(long) { get; set }
Public Methods
Flush
public override void Flush()
Read
public override int Read(byte[] buffer, int offset, int count)
Parameters:
buffer(byte[])offset(int)count(int)
Returns: int
Read
public override int Read(Span<byte> buffer)
Parameters:
buffer(Span)
Returns: int
Seek
public override long Seek(long offset, SeekOrigin origin)
Parameters:
offset(long)origin(SeekOrigin)
Returns: long
SetLength
public override void SetLength(long value)
Parameters:
value(long)
Write
public override void Write(byte[] buffer, int offset, int count)
Parameters:
buffer(byte[])offset(int)count(int)