alexa
menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class DataProvider

    Summary description for DataProvider.

    Inheritance
    object
    DataProvider
    ByteArrayDataProvider
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.XlsIO.Parser.Biff_Records
    Assembly: Syncfusion.XlsIO.NET.dll
    Syntax
    public abstract class DataProvider : IDisposable

    Constructors

    DataProvider()

    Default constructor.

    Declaration
    public DataProvider()

    Properties

    Capacity

    Returns size of the internal buffer. Read-only.

    Declaration
    public abstract int Capacity { get; }
    Property Value
    Type
    int

    IsCleared

    Indicates whether data provider was cleared.

    Declaration
    public abstract bool IsCleared { get; }
    Property Value
    Type
    bool

    Methods

    Clear()

    Clears internal storage if allowed.

    Declaration
    public abstract void Clear()

    CopyMemory(int, int, int)

    Copies memory inside internal buffer.

    Declaration
    public abstract void CopyMemory(int iDestOffset, int iSourceOffset, int iMemorySize)
    Parameters
    Type Name Description
    int iDestOffset

    Destination offset.

    int iSourceOffset

    Source offset.

    int iMemorySize

    Memory size.

    CopyTo(int, DataProvider, int, int)

    Copies data from internal storage into specified provider.

    Declaration
    public virtual void CopyTo(int iSourceOffset, DataProvider destination, int iDestOffset, int iLength)
    Parameters
    Type Name Description
    int iSourceOffset

    Source offset.

    DataProvider destination

    Destination provider.

    int iDestOffset

    Destination offset.

    int iLength

    Size in bytes of the data to copy.

    CopyTo(int, byte[], int, int)

    Copies data from internal storage into specified data array.

    Declaration
    public abstract void CopyTo(int iSourceOffset, byte[] arrDestination, int iDestOffset, int iLength)
    Parameters
    Type Name Description
    int iSourceOffset

    Source offset.

    byte[] arrDestination

    Destination array.

    int iDestOffset

    Destination offset.

    int iLength

    Size in bytes of the data to copy.

    CreateProvider()

    Creates data provider of the same type.

    Declaration
    public abstract DataProvider CreateProvider()
    Returns
    Type Description
    DataProvider

    Created data provider.

    Dispose()

    Dispose DataProvider

    Declaration
    public void Dispose()

    Dispose(bool)

    Declaration
    public void Dispose(bool isDisposing)
    Parameters
    Type Name Description
    bool isDisposing

    EnsureCapacity(int)

    Resizes internal storage if necessary.

    Declaration
    public abstract int EnsureCapacity(int size)
    Parameters
    Type Name Description
    int size

    Required size.

    Returns
    Type
    int

    EnsureCapacity(int, int)

    Resizes internal storage if necessary.

    Declaration
    public abstract int EnsureCapacity(int size, int forceAdd)
    Parameters
    Type Name Description
    int size
    int forceAdd
    Returns
    Type
    int

    ~DataProvider()

    Declaration
    protected ~DataProvider()

    MoveMemory(int, int, int)

    Moves memory inside internal buffer.

    Declaration
    public abstract void MoveMemory(int iDestOffset, int iSourceOffset, int iMemorySize)
    Parameters
    Type Name Description
    int iDestOffset

    Destination offset.

    int iSourceOffset

    Source offset.

    int iMemorySize

    Memory size.

    OnDispose()

    Declaration
    protected virtual void OnDispose()

    Read(BinaryReader, int, int, byte[])

    Reads data from BinaryReader.

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

    Reader to get data from.

    int iOffset

    Offset in the internal data to start filling from.

    int iLength

    Number of bytes to read.

    byte[] arrBuffer

    Temporary buffer to use.

    Read(BinaryReader, int, int, byte[], IDecryptor)

    Reads data from BinaryReader.

    Declaration
    public void Read(BinaryReader reader, int iOffset, int iLength, byte[] arrBuffer, IDecryptor decryptor)
    Parameters
    Type Name Description
    BinaryReader reader

    Reader to get data from.

    int iOffset

    Offset in the internal data to start filling from.

    int iLength

    Number of bytes to read.

    byte[] arrBuffer

    Temporary buffer to use.

    IDecryptor decryptor

    Object used to decrypt data if necessary.

    ReadAddr(int)

    Gets TAddr structure from internal data.

    Declaration
    [CLSCompliant(false)]
    public TAddr ReadAddr(int offset)
    Parameters
    Type Name Description
    int offset

    Offset in bytes of TAddr structure to get.

    Returns
    Type Description
    TAddr

    Retrieved TAddr structure.

    ReadAddrAsRectangle(int)

    Gets TAddr structure from internal data.

    Declaration
    public Rectangle ReadAddrAsRectangle(int offset)
    Parameters
    Type Name Description
    int offset

    Offset in bytes of TAddr structure to get.

    Returns
    Type Description
    Rectangle

    Retrieved TAddr structure.

    ReadArray(int, byte[])

    Reads data array from another data array.

    Declaration
    public int ReadArray(int iOffset, byte[] arrDest)
    Parameters
    Type Name Description
    int iOffset

    Source offset.

    byte[] arrDest

    Destination array.

    Returns
    Type Description
    int

    Updated source offset.

    ReadArray(int, byte[], int)

    Reads data array from another data array.

    Declaration
    public int ReadArray(int iOffset, byte[] arrDest, int size)
    Parameters
    Type Name Description
    int iOffset

    Source offset.

    byte[] arrDest

    Destination array.

    int size

    Number of bytes to read.

    Returns
    Type Description
    int

    Updated source offset.

    ReadBit(int, int)

    Returns bit value at the specified position.

    Declaration
    public bool ReadBit(int iOffset, int iBit)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    int iBit

    Bit index in the byte.

    Returns
    Type Description
    bool

    Bit at the specified position.

    ReadBoolean(int)

    Returns boolean value at the specified position.

    Declaration
    public bool ReadBoolean(int iOffset)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    Returns
    Type Description
    bool

    Byte at the specified position.

    ReadByte(int)

    Returns byte value at the specified position.

    Declaration
    public abstract byte ReadByte(int iOffset)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    Returns
    Type Description
    byte

    Byte at the specified position.

    ReadDouble(int)

    Returns Int32 value at the specified position.

    Declaration
    public virtual double ReadDouble(int iOffset)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    Returns
    Type Description
    double

    Int32 value at the specified position.

    ReadInt16(int)

    Returns Int16 value at the specified position.

    Declaration
    public abstract short ReadInt16(int iOffset)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    Returns
    Type Description
    short

    Int16 value at the specified position.

    ReadInt32(int)

    Returns Int32 value at the specified position.

    Declaration
    public abstract int ReadInt32(int iOffset)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    Returns
    Type Description
    int

    Int32 value at the specified position.

    ReadInt64(int)

    Returns Int32 value at the specified position.

    Declaration
    public abstract long ReadInt64(int iOffset)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    Returns
    Type Description
    long

    Int32 value at the specified position.

    ReadString(int, int, out int, bool)

    Gets string from internal record data using GetBytes.

    Declaration
    public string ReadString(int offset, int iStrLen, out int iBytesInString, bool isByteCounted)
    Parameters
    Type Name Description
    int offset

    Offset of starting byte.

    int iStrLen

    Length of the string.

    int iBytesInString

    Gets bytes count that this string occupies in the data array.

    bool isByteCounted

    Flags that represent is bytes count available.

    Returns
    Type Description
    string

    Retrieved string.

    ReadString(int, int, Encoding, bool)

    Reads string from data provider.

    Declaration
    public abstract string ReadString(int offset, int stringLength, Encoding encoding, bool isUnicode)
    Parameters
    Type Name Description
    int offset

    Offset to the first character.

    int stringLength

    Number of bytes in the string.

    Encoding encoding

    Encoding to use.

    bool isUnicode

    Indicates whether string is unicode.

    Returns
    Type Description
    string

    Extracted string.

    ReadString16Bit(int, out int)

    Gets string from internal data and returns it's length in iFullLength parameter.

    Declaration
    public virtual string ReadString16Bit(int iOffset, out int iFullLength)
    Parameters
    Type Name Description
    int iOffset

    Offset to the string data.

    int iFullLength

    Length of the string in bytes.

    Returns
    Type Description
    string

    Parsed string.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    When data array is smaller than the string that should be in it.

    ReadString16BitUpdateOffset(ref int)

    Gets string from internal data and updates offset.

    Declaration
    public virtual string ReadString16BitUpdateOffset(ref int iOffset)
    Parameters
    Type Name Description
    int iOffset

    Offset to the string data.

    Returns
    Type Description
    string

    Parsed string.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    When data array is smaller than the string that should be in it.

    ReadString8Bit(int, out int)

    Gets string from byte array and returns it's length in iFullLength parameter.

    Declaration
    public virtual string ReadString8Bit(int iOffset, out int iFullLength)
    Parameters
    Type Name Description
    int iOffset

    Offset to the string data.

    int iFullLength

    Length of the string in bytes.

    Returns
    Type Description
    string

    Parsed string.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    When data array is smaller than the string that should be in it.

    ReadStringUpdateOffset(ref int, int)

    Gets string from internal record data using GetBytes and it increases offset by string size in bytes.

    Declaration
    public string ReadStringUpdateOffset(ref int offset, int iStrLen)
    Parameters
    Type Name Description
    int offset

    Offset of starting byte.

    int iStrLen

    Length of the string.

    Returns
    Type Description
    string

    Retrieved string.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    if Offset + iStrLen is out of data array

    ReadUInt16(int)

    Returns UInt16 value at the specified position.

    Declaration
    [CLSCompliant(false)]
    public ushort ReadUInt16(int iOffset)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    Returns
    Type Description
    ushort

    Int16 value at the specified position.

    ReadUInt32(int)

    Returns Int32 value at the specified position.

    Declaration
    [CLSCompliant(false)]
    public uint ReadUInt32(int iOffset)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    Returns
    Type Description
    uint

    Int32 value at the specified position.

    WriteAddr(int, Rectangle)

    Sets TAddr structure in internal record data.

    Declaration
    protected void WriteAddr(int offset, Rectangle addr)
    Parameters
    Type Name Description
    int offset

    Offset in bytes of TAddr structure to set.

    Rectangle addr

    New value of the Rectangle at the specified position.

    WriteAddr(int, TAddr)

    Sets TAddr structure in internal record data.

    Declaration
    [CLSCompliant(false)]
    protected void WriteAddr(int offset, TAddr addr)
    Parameters
    Type Name Description
    int offset

    Offset in bytes of TAddr structure to set.

    TAddr addr

    New value of the TAddr at the specified position.

    WriteBit(int, bool, int)

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

    Declaration
    public abstract void WriteBit(int offset, bool value, int bitPos)
    Parameters
    Type Name Description
    int offset

    Offset of the byte in the data array.

    bool value

    Value of bit.

    int bitPos

    Bit position in the byte.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    If bitPos is less than zero or more than 7.

    WriteByte(int, byte)

    Writes byte value at the specified position.

    Declaration
    public abstract void WriteByte(int iOffset, byte value)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    byte value

    Byte value to write at the specified position.

    WriteBytes(int, byte[])

    Sets bytes in internal record data array values.

    Declaration
    public void WriteBytes(int offset, byte[] data)
    Parameters
    Type Name Description
    int offset

    Offset in internal record data array to start from.

    byte[] data

    Array of bytes to set.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    If value array is NULL.

    ArgumentOutOfRangeException

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

    ArgumentOutOfRangeException

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

    WriteBytes(int, byte[], int, int)

    Sets bytes in internal record data array values.

    Declaration
    public abstract void WriteBytes(int offset, byte[] value, int pos, int length)
    Parameters
    Type Name Description
    int offset

    Offset in internal record data array to start from.

    byte[] value

    Array of bytes to set.

    int pos

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

    int length

    Length of the data.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    If value array is NULL.

    ArgumentOutOfRangeException

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

    ArgumentOutOfRangeException

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

    WriteDouble(int, double)

    Writes Double value at the specified position.

    Declaration
    public abstract void WriteDouble(int iOffset, double value)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    double value

    Double value to write at the specified position.

    WriteInt16(int, short)

    Writes Int16 value at the specified position.

    Declaration
    public abstract void WriteInt16(int iOffset, short value)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    short value

    Int16 value to write at the specified position.

    WriteInt32(int, int)

    Writes Int16 value at the specified position.

    Declaration
    public abstract void WriteInt32(int iOffset, int value)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    int value

    Int32 value to write at the specified position.

    WriteInt64(int, long)

    Writes Int16 value at the specified position.

    Declaration
    public abstract void WriteInt64(int iOffset, long value)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    long value

    Int32 value to write at the specified position.

    WriteInto(BinaryWriter, int, int, byte[])

    Saves data into binary writer.

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

    Writer to save data into.

    int iOffset

    Start offset in the internal storage.

    int iSize

    Number of bytes to save.

    byte[] arrBuffer

    Temporary buffer to use.

    WriteString16Bit(int, string)

    Sets string in internal data. The String length is saved in two bytes.

    Declaration
    public int WriteString16Bit(int offset, string value)
    Parameters
    Type Name Description
    int offset

    Offset to the string.

    string value

    Value of the string.

    Returns
    Type Description
    int

    Size of the written data.

    WriteString16Bit(int, string, bool)

    Sets string in internal data. The String length is saved in two bytes.

    Declaration
    public int WriteString16Bit(int offset, string value, bool isUnicode)
    Parameters
    Type Name Description
    int offset

    Offset to the string.

    string value

    Value of the string.

    bool isUnicode

    Indicates whether string should be stored in unicode format.

    Returns
    Type Description
    int

    Size of the written data.

    WriteString16BitUpdateOffset(ref int, string)

    Sets string in internal data. The String length is saved in two bytes.

    Declaration
    public void WriteString16BitUpdateOffset(ref int offset, string value)
    Parameters
    Type Name Description
    int offset

    Offset to the string.

    string value

    Value of the string.

    WriteString16BitUpdateOffset(ref int, string, bool)

    Sets string in internal data. The String length is saved in two bytes.

    Declaration
    public void WriteString16BitUpdateOffset(ref int offset, string value, bool isUnicode)
    Parameters
    Type Name Description
    int offset

    Offset to the string.

    string value

    Value of the string.

    bool isUnicode

    Indicates whether string should be stored as unicode.

    WriteString8BitUpdateOffset(ref int, string)

    Sets string in internal data. The String length is saved in two bytes.

    Declaration
    public void WriteString8BitUpdateOffset(ref int offset, string value)
    Parameters
    Type Name Description
    int offset

    Offset to the string.

    string value

    Value of the string.

    WriteStringNoLenUpdateOffset(ref int, string)

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

    Declaration
    public virtual void WriteStringNoLenUpdateOffset(ref int offset, string value)
    Parameters
    Type Name Description
    int offset

    Offset to the string.

    string value

    Value of the string.

    WriteStringNoLenUpdateOffset(ref int, string, bool)

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

    Declaration
    public abstract void WriteStringNoLenUpdateOffset(ref int offset, string value, bool bUnicode)
    Parameters
    Type Name Description
    int offset

    Offset to the string.

    string value

    Value of the string.

    bool bUnicode

    Indicates whether string should be stored in Unicode encoding or not.

    WriteUInt16(int, ushort)

    Writes Int16 value at the specified position.

    Declaration
    [CLSCompliant(false)]
    public virtual void WriteUInt16(int iOffset, ushort value)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    ushort value

    Int16 value to write at the specified position.

    WriteUInt32(int, uint)

    Writes Int16 value at the specified position.

    Declaration
    [CLSCompliant(false)]
    public void WriteUInt32(int iOffset, uint value)
    Parameters
    Type Name Description
    int iOffset

    Offset to the required value.

    uint value

    Int32 value to write at the specified position.

    ZeroMemory()

    Writes zeros inside memory block.

    Declaration
    public abstract void ZeroMemory()

    Implements

    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved