Class StreamWithLength
Adds Length and Position (get) support to Stream.
Inheritance
System.Object
StreamWithLength
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
Position
Declaration
public override long Position { get; set; }
Property Value
Type |
Description |
System.Int64 |
|
Overrides
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
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
SetLength(Int64)
Declaration
public override void SetLength(long value)
Parameters
Type |
Name |
Description |
System.Int64 |
value |
|
Overrides
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
WriteByte(Byte)
Declaration
public override void WriteByte(byte value)
Parameters
Type |
Name |
Description |
System.Byte |
value |
|
Extension Methods