menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MIMEDataStream - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class MIMEDataStream

    MIMEStreamClass used to store start and end position of some data in stream and decode it, when needed.

    Inheritance
    System.Object
    System.MarshalByRefObject
    System.IO.Stream
    MIMEDataStream
    Implements
    System.IDisposable
    Inherited Members
    System.IO.Stream.BeginRead(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)
    System.IO.Stream.BeginWrite(System.Byte[], System.Int32, System.Int32, System.AsyncCallback, System.Object)
    System.IO.Stream.CanTimeout
    System.IO.Stream.Close()
    System.IO.Stream.CopyTo(System.IO.Stream)
    System.IO.Stream.CopyTo(System.IO.Stream, System.Int32)
    System.IO.Stream.CopyToAsync(System.IO.Stream)
    System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32)
    System.IO.Stream.CopyToAsync(System.IO.Stream, System.Int32, System.Threading.CancellationToken)
    System.IO.Stream.CreateWaitHandle()
    System.IO.Stream.Dispose()
    System.IO.Stream.Dispose(System.Boolean)
    System.IO.Stream.EndRead(System.IAsyncResult)
    System.IO.Stream.EndWrite(System.IAsyncResult)
    System.IO.Stream.FlushAsync()
    System.IO.Stream.FlushAsync(System.Threading.CancellationToken)
    System.IO.Stream.Null
    System.IO.Stream.ObjectInvariant()
    System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32)
    System.IO.Stream.ReadAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)
    System.IO.Stream.ReadByte()
    System.IO.Stream.ReadTimeout
    System.IO.Stream.Synchronized(System.IO.Stream)
    System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32)
    System.IO.Stream.WriteAsync(System.Byte[], System.Int32, System.Int32, System.Threading.CancellationToken)
    System.IO.Stream.WriteByte(System.Byte)
    System.IO.Stream.WriteTimeout
    System.MarshalByRefObject.CreateObjRef(System.Type)
    System.MarshalByRefObject.GetLifetimeService()
    System.MarshalByRefObject.InitializeLifetimeService()
    System.MarshalByRefObject.MemberwiseClone(System.Boolean)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    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
    System.IO.Stream.CanRead

    CanSeek

    property to check if can seek in current stream.

    Declaration
    public override bool CanSeek { get; }
    Property Value
    Type
    System.Boolean
    Overrides
    System.IO.Stream.CanSeek

    CanWrite

    property to check if can write to current stream.

    Declaration
    public override bool CanWrite { get; }
    Property Value
    Type
    System.Boolean
    Overrides
    System.IO.Stream.CanWrite

    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
    System.IO.Stream.Length

    Position

    gets/sets position of current stream.

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

    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
    System.IO.Stream.Flush()

    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
    System.IO.Stream.Read(System.Byte[], System.Int32, System.Int32)

    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
    System.IO.Stream.Seek(System.Int64, System.IO.SeekOrigin)

    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
    System.IO.Stream.SetLength(System.Int64)

    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.

    Overrides
    System.IO.Stream.Write(System.Byte[], System.Int32, System.Int32)

    Implements

    System.IDisposable

    Extension Methods

    ExtensionMethods.GetBytes(Stream)
    ExtensionMethods.CopyTo(Stream, Stream)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved