Class ByteArrayDataProvider
Summary description for ByteArrayDataProvider.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Parser.Biff_Records
Assembly: Syncfusion.XlsIO.UWP.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
IsCleared
Declaration
public override bool IsCleared { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
Methods
Clear()
Clears internal data.
Declaration
public override void Clear()
Overrides
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
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
CreateProvider()
Creates provider of the same type.
Declaration
public override DataProvider CreateProvider()
Returns
Type | Description |
---|---|
DataProvider | Created provider object. |
Overrides
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
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
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
OnDispose()
Declaration
protected override void OnDispose()
Overrides
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
WriteUInt16(Int32, UInt16)
Writes Int16 value at the specified position.
Declaration
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
ZeroMemory()
Writes zeros inside memory block.
Declaration
public override void ZeroMemory()