Show / Hide Table of Contents

Class StreamWithLength

Adds Length and Position (get) support to Stream.

Inheritance
System.Object
WrapperStream
StreamWithLength
Inherited Members
WrapperStream.Flush()
WrapperStream.Dispose(Boolean)
WrapperStream.Stream
WrapperStream.CanRead
WrapperStream.CanSeek
WrapperStream.CanWrite
Namespace: Eco.Core.Utils.Streams
Assembly: Eco.Core.dll
Syntax
public class StreamWithLength : WrapperStream

Constructors

StreamWithLength(Stream, Int64, Boolean)

Declaration
public StreamWithLength(Stream stream, long length, bool leaveOpen = false)
Parameters
Type Name Description
System.IO.Stream stream
System.Int64 length
System.Boolean leaveOpen

StreamWithLength(Stream, Int64, Int64, Boolean)

Declaration
public StreamWithLength(Stream stream, long length, long position, bool leaveOpen = false)
Parameters
Type Name Description
System.IO.Stream stream
System.Int64 length
System.Int64 position
System.Boolean leaveOpen

Properties

Length

Declaration
public override long Length { get; }
Property Value
Type Description
System.Int64
Overrides
WrapperStream.Length

Position

Declaration
public override long Position { get; set; }
Property Value
Type Description
System.Int64
Overrides
WrapperStream.Position

Methods

Read(Byte[], Int32, Int32)

Declaration
public override int Read(byte[] buffer, int offset, int count)
Parameters
Type Name Description
System.Byte[] buffer
System.Int32 offset
System.Int32 count
Returns
Type Description
System.Int32
Overrides
WrapperStream.Read(Byte[], Int32, Int32)

ReadByte()

Declaration
public override int ReadByte()
Returns
Type Description
System.Int32

Seek(Int64, SeekOrigin)

Declaration
public override long Seek(long offset, SeekOrigin origin)
Parameters
Type Name Description
System.Int64 offset
System.IO.SeekOrigin origin
Returns
Type Description
System.Int64
Overrides
WrapperStream.Seek(Int64, SeekOrigin)

SetLength(Int64)

Declaration
public override void SetLength(long value)
Parameters
Type Name Description
System.Int64 value
Overrides
WrapperStream.SetLength(Int64)

Write(Byte[], Int32, Int32)

Declaration
public override void Write(byte[] buffer, int offset, int count)
Parameters
Type Name Description
System.Byte[] buffer
System.Int32 offset
System.Int32 count
Overrides
WrapperStream.Write(Byte[], Int32, Int32)

WriteByte(Byte)

Declaration
public override void WriteByte(byte value)
Parameters
Type Name Description
System.Byte value

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾