API C#
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Kinova.DLL.Tools.Data.CDataManipulator Class Reference

Static Public Member Functions

static byte[] RawSerialize (object objectToSerialize)
 Serialize in raw mode. More...
 
static object RawDeserialize (byte[] rawdatas, Type type)
 Raws the deserialize. More...
 
static byte[] AppendArrays (byte[] a, byte[] b)
 Appends the arrays. More...
 
static byte[] StrToByteArray (string str)
 Convert string to a byte array. More...
 
static string ByteArrayToStr (byte[] byteArray)
 Convert a bytes array to a string More...
 
static List< byte > GetBinaryByteArray (int number)
 Gets a binary byte array from an integer value. For example, if the number is 18, the return value will be [1,0,0,1,0]. More...
 
static byte[] ToByteArray (BitArray bits)
 Convert a bit array to a byteArray. For example, if bits look like this : [1,0,0,0,0,0,0,0] the return value will bw : [1] and if bits look like this : [0,0,0,0,0,0,0,1], the return value will be : [128] More...
 

Member Function Documentation

static byte [] Kinova.DLL.Tools.Data.CDataManipulator.AppendArrays ( byte[]  a,
byte[]  b 
)
static

Appends the arrays.

Parameters
aA.
bThe b.
Returns
Exceptions
ArgumentOutOfRangeExceptionIndex in BlockCopy are not good.
ArgumentNullExceptionOne or both array in BlockCopy is/are null.
ArgumentExceptionOne or both array isn't/aren't an array of primitives or index problem.
static string Kinova.DLL.Tools.Data.CDataManipulator.ByteArrayToStr ( byte[]  byteArray)
static

Convert a bytes array to a string

Parameters
byteArrayThe byte array.
Returns
Exceptions
ArgumentNullExceptionYou are trying to parse a null string into a byte array
static List<byte> Kinova.DLL.Tools.Data.CDataManipulator.GetBinaryByteArray ( int  number)
static

Gets a binary byte array from an integer value. For example, if the number is 18, the return value will be [1,0,0,1,0].

Parameters
numberThe integer value.
Returns
static object Kinova.DLL.Tools.Data.CDataManipulator.RawDeserialize ( byte[]  rawdatas,
Type  type 
)
static

Raws the deserialize.

Parameters
rawdatasThe rawdatas.
typeThe type.
Returns
Exceptions
ArgumentNullExceptionThe parameter object objectToSerialize is null. It is possible that a local variable from this method has been set to null by error.
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentExceptionThe parameter object objectToSerialize is a generic type.
static byte [] Kinova.DLL.Tools.Data.CDataManipulator.RawSerialize ( object  objectToSerialize)
static

Serialize in raw mode.

Parameters
objectToSerializeThe object to serialize.
Returns
Exceptions
ArgumentNullExceptionThe parameter object objectToSerialize is null. It is possible that a local variable from this method has been set to null by error.
OutOfMemoryExceptionInsufficient memory to perform this action.
ArgumentExceptionThe parameter object objectToSerialize is a generic type.
static byte [] Kinova.DLL.Tools.Data.CDataManipulator.StrToByteArray ( string  str)
static

Convert string to a byte array.

Parameters
strThe string to be converted.
Returns
Exceptions
ArgumentNullExceptionYou are trying to parse a null string into a byte array
static byte [] Kinova.DLL.Tools.Data.CDataManipulator.ToByteArray ( BitArray  bits)
static

Convert a bit array to a byteArray. For example, if bits look like this : [1,0,0,0,0,0,0,0] the return value will bw : [1] and if bits look like this : [0,0,0,0,0,0,0,1], the return value will be : [128]

Parameters
bitsThe bit array.
Returns

The documentation for this class was generated from the following file: