menu

WPF

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

    Show / Hide Table of Contents

    Class ByteArrayDataProvider

    Summary description for ByteArrayDataProvider.

    Inheritance
    System.Object
    DataProvider
    ByteArrayDataProvider
    Implements
    System.IDisposable
    Inherited Members
    DataProvider.Dispose()
    DataProvider.Dispose(Boolean)
    DataProvider.Read(BinaryReader, Int32, Int32, Byte[], IDecryptor)
    DataProvider.ReadAddr(Int32)
    DataProvider.ReadAddrAsRectangle(Int32)
    DataProvider.ReadArray(Int32, Byte[])
    DataProvider.ReadArray(Int32, Byte[], Int32)
    DataProvider.ReadBit(Int32, Int32)
    DataProvider.ReadBoolean(Int32)
    DataProvider.ReadDouble(Int32)
    DataProvider.ReadString(Int32, Int32, Int32, Boolean)
    DataProvider.ReadString16Bit(Int32, Int32)
    DataProvider.ReadString16BitUpdateOffset(Int32)
    DataProvider.ReadString8Bit(Int32, Int32)
    DataProvider.ReadStringUpdateOffset(Int32, Int32)
    DataProvider.ReadUInt16(Int32)
    DataProvider.ReadUInt32(Int32)
    DataProvider.WriteAddr(Int32, Rectangle)
    DataProvider.WriteAddr(Int32, TAddr)
    DataProvider.WriteBytes(Int32, Byte[])
    DataProvider.WriteString16Bit(Int32, String)
    DataProvider.WriteString16Bit(Int32, String, Boolean)
    DataProvider.WriteString16BitUpdateOffset(Int32, String)
    DataProvider.WriteString16BitUpdateOffset(Int32, String, Boolean)
    DataProvider.WriteString8BitUpdateOffset(Int32, String)
    DataProvider.WriteStringNoLenUpdateOffset(Int32, String)
    DataProvider.WriteUInt32(Int32, UInt32)
    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.XlsIO.Parser.Biff_Records
    Assembly: Syncfusion.XlsIO.Base.dll
    Syntax
    public class ByteArrayDataProvider : DataProvider, IDisposable

    Constructors

    ByteArrayDataProvider()

    Default constructor to prevent creation of items without arguments.

    Declaration
    public ByteArrayDataProvider()

    ByteArrayDataProvider(Byte[])

    Creates new instance of this class.

    Declaration
    public ByteArrayDataProvider(byte[] arrData)
    Parameters
    Type Name Description
    System.Byte[] arrData

    Array to read data from.

    Properties

    Capacity

    Returns size of the internal buffer. Read-only.

    Declaration
    public override int Capacity { get; }
    Property Value
    Type
    System.Int32
    Overrides
    DataProvider.Capacity

    IsCleared

    Declaration
    public override bool IsCleared { get; }
    Property Value
    Type
    System.Boolean
    Overrides
    DataProvider.IsCleared

    Methods

    Clear()

    Clears internal data.

    Declaration
    public override void Clear()
    Overrides
    DataProvider.Clear()

    CopyMemory(Int32, Int32, Int32)

    Copies memory inside internal buffer.

    Declaration
    public override void CopyMemory(int iDestOffset, int iSourceOffset, int iMemorySize)
    Parameters
    Type Name Description
    System.Int32 iDestOffset

    Destination offset.

    System.Int32 iSourceOffset

    Source offset.

    System.Int32 iMemorySize

    Memory size.

    Overrides
    DataProvider.CopyMemory(Int32, Int32, Int32)

    CopyTo(Int32, DataProvider, Int32, Int32)

    Copies data from internal storage into specified provider.

    Declaration
    public override void CopyTo(int iSourceOffset, DataProvider destination, int iDestOffset, int iLength)
    Parameters
    Type Name Description
    System.Int32 iSourceOffset

    Source offset.

    DataProvider destination

    Destination provider.

    System.Int32 iDestOffset

    Destination offset.

    System.Int32 iLength

    Size in bytes of the data to copy.

    Overrides
    DataProvider.CopyTo(Int32, DataProvider, Int32, Int32)

    CopyTo(Int32, Byte[], Int32, Int32)

    Copies data from internal storage into specified

    Declaration
    public override void CopyTo(int iSourceOffset, byte[] arrDestination, int iDestOffset, int iLength)
    Parameters
    Type Name Description
    System.Int32 iSourceOffset

    Source offset.

    System.Byte[] arrDestination

    Destination array.

    System.Int32 iDestOffset

    Destination offset.

    System.Int32 iLength

    Size in bytes of the data to copy.

    Overrides
    DataProvider.CopyTo(Int32, Byte[], Int32, Int32)

    CreateProvider()

    Creates provider of the same type.

    Declaration
    public override DataProvider CreateProvider()
    Returns
    Type Description
    DataProvider

    Created provider object.

    Overrides
    DataProvider.CreateProvider()

    EnsureCapacity(Int32)

    Resizes internal storage if necessary.

    Declaration
    public override int EnsureCapacity(int size)
    Parameters
    Type Name Description
    System.Int32 size

    Required size.

    Returns
    Type
    System.Int32
    Overrides
    DataProvider.EnsureCapacity(Int32)

    EnsureCapacity(Int32, Int32)

    Resizes internal storage if necessary

    Declaration
    public override int EnsureCapacity(int size, int forceAdd)
    Parameters
    Type Name Description
    System.Int32 size
    System.Int32 forceAdd
    Returns
    Type
    System.Int32
    Overrides
    DataProvider.EnsureCapacity(Int32, Int32)

    MoveMemory(Int32, Int32, Int32)

    Moves memory inside internal buffer.

    Declaration
    public override void MoveMemory(int iDestOffset, int iSourceOffset, int iMemorySize)
    Parameters
    Type Name Description
    System.Int32 iDestOffset

    Destination offset.

    System.Int32 iSourceOffset

    Source offset.

    System.Int32 iMemorySize

    Memory size.

    Overrides
    DataProvider.MoveMemory(Int32, Int32, Int32)

    OnDispose()

    Declaration
    protected override void OnDispose()
    Overrides
    DataProvider.OnDispose()

    Read(BinaryReader, Int32, Int32, Byte[])

    Reads data from BinaryReader.

    Declaration
    public override void Read(BinaryReader reader, int iOffset, int iLength, byte[] arrBuffer)
    Parameters
    Type Name Description
    System.IO.BinaryReader reader

    Reader to get data from.

    System.Int32 iOffset

    Offset in the internal data to start filling from.

    System.Int32 iLength

    Number of bytes to read.

    System.Byte[] arrBuffer

    Temporary buffer needed for some operations.

    Overrides
    DataProvider.Read(BinaryReader, Int32, Int32, Byte[])

    ReadByte(Int32)

    Returns byte value at the specified position.

    Declaration
    public override byte ReadByte(int iOffset)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    Returns
    Type Description
    System.Byte

    Byte at the specified position.

    Overrides
    DataProvider.ReadByte(Int32)

    ReadInt16(Int32)

    Returns Int16 value at the specified position.

    Declaration
    public override short ReadInt16(int iOffset)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    Returns
    Type Description
    System.Int16

    Int16 value at the specified position.

    Overrides
    DataProvider.ReadInt16(Int32)

    ReadInt32(Int32)

    Returns Int32 value at the specified position.

    Declaration
    public override int ReadInt32(int iOffset)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    Returns
    Type Description
    System.Int32

    Int32 value at the specified position.

    Overrides
    DataProvider.ReadInt32(Int32)

    ReadInt64(Int32)

    Returns Int32 value at the specified position.

    Declaration
    public override long ReadInt64(int iOffset)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    Returns
    Type Description
    System.Int64

    Int32 value at the specified position.

    Overrides
    DataProvider.ReadInt64(Int32)

    ReadString(Int32, Int32, Encoding, Boolean)

    Reads string from data provider.

    Declaration
    public override string ReadString(int offset, int stringLength, Encoding encoding, bool isUnicode)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset to the first character.

    System.Int32 stringLength

    Number of bytes in the string.

    System.Text.Encoding encoding

    Encoding to use.

    System.Boolean isUnicode

    Indicates is unicode encoding.

    Returns
    Type Description
    System.String

    Extracted string.

    Overrides
    DataProvider.ReadString(Int32, Int32, Encoding, Boolean)

    WriteBit(Int32, Boolean, Int32)

    Sets one bit in specified byte in internal record data array.

    Declaration
    public override void WriteBit(int offset, bool value, int bitPos)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset of the byte in the data array.

    System.Boolean value

    Value of bit.

    System.Int32 bitPos

    Bit position in the byte.

    Overrides
    DataProvider.WriteBit(Int32, Boolean, Int32)
    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    If bitPos is less than zero or more than 7.

    WriteByte(Int32, Byte)

    Writes byte value at the specified position.

    Declaration
    public override void WriteByte(int iOffset, byte value)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    System.Byte value

    Byte value to write at the specified position.

    Overrides
    DataProvider.WriteByte(Int32, Byte)

    WriteBytes(Int32, Byte[], Int32, Int32)

    Sets bytes in internal record data array values.

    Declaration
    public override void WriteBytes(int offset, byte[] value, int pos, int length)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset in internal record data array to start from.

    System.Byte[] value

    Array of bytes to set.

    System.Int32 pos

    Position in value array to the data that will be set.

    System.Int32 length

    Length of the data.

    Overrides
    DataProvider.WriteBytes(Int32, Byte[], Int32, Int32)
    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    If value array is NULL.

    System.ArgumentOutOfRangeException

    If pos or length would be less than zero or their sum would be more than size of value array.

    System.ArgumentOutOfRangeException

    If internal record data array is too small for receiving value array and AutoGrowData is False.

    WriteDouble(Int32, Double)

    Writes Int32 value at the specified position.

    Declaration
    public override void WriteDouble(int iOffset, double value)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    System.Double value

    Double value to write at the specified position.

    Overrides
    DataProvider.WriteDouble(Int32, Double)

    WriteInt16(Int32, Int16)

    Writes Int16 value at the specified position.

    Declaration
    public override void WriteInt16(int iOffset, short value)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    System.Int16 value

    Int16 value to write at the specified position.

    Overrides
    DataProvider.WriteInt16(Int32, Int16)

    WriteInt32(Int32, Int32)

    Writes Int32 value at the specified position.

    Declaration
    public override void WriteInt32(int iOffset, int value)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    System.Int32 value

    Int32 value to write at the specified position.

    Overrides
    DataProvider.WriteInt32(Int32, Int32)

    WriteInt64(Int32, Int64)

    Writes Int32 value at the specified position.

    Declaration
    public override void WriteInt64(int iOffset, long value)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    System.Int64 value

    Int32 value to write at the specified position.

    Overrides
    DataProvider.WriteInt64(Int32, Int64)

    WriteInto(BinaryWriter, Int32, Int32, Byte[])

    Saves data into binary writer.

    Declaration
    public override void WriteInto(BinaryWriter writer, int iOffset, int iSize, byte[] arrBuffer)
    Parameters
    Type Name Description
    System.IO.BinaryWriter writer

    Writer to save data into.

    System.Int32 iOffset

    Start offset in the internal storage.

    System.Int32 iSize

    Number of bytes to save.

    System.Byte[] arrBuffer

    Temporary buffer to use.

    Overrides
    DataProvider.WriteInto(BinaryWriter, Int32, Int32, Byte[])

    WriteStringNoLenUpdateOffset(ref Int32, String, Boolean)

    Sets string in internal data without string length, updates offset parameter (adds string length).

    Declaration
    public override void WriteStringNoLenUpdateOffset(ref int offset, string value, bool unicode)
    Parameters
    Type Name Description
    System.Int32 offset

    Offset to the string.

    System.String value

    Value of the string.

    System.Boolean unicode

    Indicates whether to use unicode encoding or not.

    Overrides
    DataProvider.WriteStringNoLenUpdateOffset(ref Int32, String, Boolean)

    WriteUInt16(Int32, UInt16)

    Writes Int16 value at the specified position.

    Declaration
    [CLSCompliant(false)]
    public override void WriteUInt16(int iOffset, ushort value)
    Parameters
    Type Name Description
    System.Int32 iOffset

    Offset to the required value.

    System.UInt16 value

    Int16 value to write at the specified position.

    Overrides
    DataProvider.WriteUInt16(Int32, UInt16)

    ZeroMemory()

    Writes zeros inside memory block.

    Declaration
    public override void ZeroMemory()
    Overrides
    DataProvider.ZeroMemory()

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved