Class MemoryConverter
Class that encapsulates pointer to unmanaged memory block and used to convert managed memory block (byte array) into managed object.
Inheritance
Namespace: Syncfusion.XlsIO.Parser
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class MemoryConverter : Object
Constructors
MemoryConverter()
Default constructor.
Declaration
public MemoryConverter()
MemoryConverter(Int32)
Initializes new instance of MemoryConverter with specified memory block size.
Declaration
public MemoryConverter(int iMemoryBlockSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iMemoryBlockSize | Size of the memory block. |
Methods
Copy(Byte[], Int32, Int32, Object)
Copies data from byte array into specified object.
Declaration
public void Copy(byte[] arrData, int iStartIndex, int iCount, object destination)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | arrData | Data to copy. |
System.Int32 | iStartIndex | Start index of the data to copy. |
System.Int32 | iCount | Number of bytes to copy. |
System.Object | destination | Destination object. |
Copy(Byte[], Int32, Object)
Copies data from byte array into specified object.
Declaration
public void Copy(byte[] arrData, int iStartIndex, object destination)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | arrData | Data to copy. |
System.Int32 | iStartIndex | Start index of the data to copy. |
System.Object | destination | Destination object. |
Copy(Byte[], Object)
Copies data from byte array into specified object.
Declaration
public void Copy(byte[] arrData, object destination)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | arrData | Data to copy. |
System.Object | destination | Destination object. |
CopyFrom(Byte[])
Copies data from arrData into internal memory block.
Declaration
public void CopyFrom(byte[] arrData)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | arrData | Data to copy. |
CopyFrom(Byte[], Int32)
Copies data from arrData into internal memory block starting from specified index to the end of the array.
Declaration
public void CopyFrom(byte[] arrData, int iStartIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | arrData | Data to copy. |
System.Int32 | iStartIndex | Start index of the data to copy. |
CopyFrom(Byte[], Int32, Int32)
Copies specified number of bytes from arrData into internal memory block starting from specified index to the end of the array.
Declaration
public void CopyFrom(byte[] arrData, int iStartIndex, int iCount)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | arrData | Data to copy. |
System.Int32 | iStartIndex | Start index of the data to copy. |
System.Int32 | iCount | Number of bytes to copy. |
CopyObject(Object, Byte[], Int32)
Declaration
public void CopyObject(object source, byte[] arrDestination, int iCount)
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | |
System.Byte[] | arrDestination | |
System.Int32 | iCount |
CopyTo(Object)
Copies data from internal memory block into object.
Declaration
public void CopyTo(object destination)
Parameters
Type | Name | Description |
---|---|---|
System.Object | destination | Destination object. |
CopyTo(Type)
Copies data from internal memory block into object.
Declaration
public object CopyTo(Type destType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | destType | Destination object. |
Returns
Type |
---|
System.Object |
EnsureMemoryBlockSize(Int32)
Ensures that memory block will be able to accept iDesiredSize bytes.
Declaration
public void EnsureMemoryBlockSize(int iDesiredSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iDesiredSize | Bytes that memory block should be able to accept. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | If iDesiredSize is larger than maximum possible memory block size. |
System.OutOfMemoryException | When was unable to allocate desired memory block size. |