Class MIMEDataStream
MIMEStreamClass used to store start and end position of some data in stream and decode it, when needed.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.MIME.Base.Implementation.Streams
Assembly: Syncfusion.MIME.Base.dll
Syntax
public class MIMEDataStream : Stream, IDisposable
Constructors
MIMEDataStream(Stream)
constructor.
Declaration
public MIMEDataStream(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | stream to read from. |
Properties
CanRead
property to check if can read current stream.
Declaration
public override bool CanRead { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
CanSeek
property to check if can seek in current stream.
Declaration
public override bool CanSeek { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
CanWrite
property to check if can write to current stream.
Declaration
public override bool CanWrite { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
Charset
get/set charset of encoded text.
Declaration
public string Charset { get; set; }
Property Value
Type |
---|
System.String |
DataEncoding
encoding used while reading stream.
Declaration
public PartDataEncoding DataEncoding { get; set; }
Property Value
Type |
---|
PartDataEncoding |
EndPosition
end position in steream.
Declaration
public int EndPosition { get; set; }
Property Value
Type |
---|
System.Int32 |
Length
property to get length of current stream.
Declaration
public override long Length { get; }
Property Value
Type |
---|
System.Int64 |
Overrides
Position
gets/sets position of current stream.
Declaration
public override long Position { get; set; }
Property Value
Type |
---|
System.Int64 |
Overrides
StartPosition
Start porition in stream.
Declaration
public int StartPosition { get; set; }
Property Value
Type |
---|
System.Int32 |
Methods
DecodeBinHex(Byte[], Int32, Int32)
method to get decoded bytes from binhex ecoded data.
Declaration
public int DecodeBinHex(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | buffer to write. |
System.Int32 | offset | offset in buffer to start with. |
System.Int32 | count | number of bytes to fill. |
Returns
Type | Description |
---|---|
System.Int32 | number of filled bytes. |
Flush()
Cleares all buffers, streams...
Declaration
public override void Flush()
Overrides
Read(Byte[], Int32, Int32)
reads controlled sub string.
Declaration
public override int Read(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | buffre to write. |
System.Int32 | offset | offset in buffer to start with. |
System.Int32 | count | number of bytes to fill. |
Returns
Type | Description |
---|---|
System.Int32 | number of filled bytes. |
Overrides
Seek(Int64, SeekOrigin)
method to perform seek operation.
Declaration
public override long Seek(long offset, SeekOrigin origin)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | offset | offset. |
System.IO.SeekOrigin | origin | origin |
Returns
Type | Description |
---|---|
System.Int64 | seeked position |
Overrides
SetLength(Int64)
sets length of controlled sub stream .
Declaration
public override void SetLength(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | setting length of stream. |
Overrides
Write(Byte[], Int32, Int32)
method to write data to the stream.
Declaration
public override void Write(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | buffre to write. |
System.Int32 | offset | offset in buffer to start with. |
System.Int32 | count | number of bytes to fill. |