Skip to main content

SupportClass

SupportClass

Cocos2D.Compression.Zlib

Inheritance: System.Object

Constructors

SupportClass()

SupportClass()()

Methods

Identity(double)

System.Double Identity(double)(System.Double literal)

This method returns the literal value received

Parameters:
literal (System.Double) - The literal to return
Returns:
System.Double - The received value
Example

Identity(long)

System.Int64 Identity(long)(System.Int64 literal)

This method returns the literal value received

Parameters:
literal (System.Int64) - The literal to return
Returns:
System.Int64 - The received value
Example

Identity(float)

System.Single Identity(float)(System.Single literal)

This method returns the literal value received

Parameters:
literal (System.Single) - The literal to return
Returns:
System.Single - The received value
Example

Identity(ulong)

System.UInt64 Identity(ulong)(System.UInt64 literal)

This method returns the literal value received

Parameters:
literal (System.UInt64) - The literal to return
Returns:
System.UInt64 - The received value
Example

ReadInput(Stream, byte[], int, int)

System.Int32 ReadInput(Stream, byte[], int, int)(System.IO.Stream sourceStream, System.Byte[] target, System.Int32 start, System.Int32 count)

Reads a number of characters from the current source Stream and writes the data to the target array at the specified index.

Parameters:
sourceStream (System.IO.Stream) - The source Stream to read from.
target (System.Byte[]) - Contains the array of characteres read from the source Stream.
start (System.Int32) - The starting index of the target array.
count (System.Int32) - The maximum number of characters to read from the source Stream.
Returns:
System.Int32 - The number of characters read. The number will be less than or equal to count depending on the data available in the source Stream. Returns -1 if the end of the stream is reached.
Example

ReadInput(TextReader, byte[], int, int)

System.Int32 ReadInput(TextReader, byte[], int, int)(System.IO.TextReader sourceTextReader, System.Byte[] target, System.Int32 start, System.Int32 count)

Reads a number of characters from the current source TextReader and writes the data to the target array at the specified index.

Parameters:
sourceTextReader (System.IO.TextReader) - The source TextReader to read from
target (System.Byte[]) - Contains the array of characteres read from the source TextReader.
start (System.Int32) - The starting index of the target array.
count (System.Int32) - The maximum number of characters to read from the source TextReader.
Returns:
System.Int32 - The number of characters read. The number will be less than or equal to count depending on the data available in the source TextReader. Returns -1 if the end of the stream is reached.
Example

ToByteArray(string)

System.Byte[] ToByteArray(string)(System.String sourceString)

Converts a string to an array of bytes

Parameters:
sourceString (System.String) - The string to be converted
Returns:
System.Byte[] - The new array of bytes
Example

ToCharArray(byte[])

System.Char[] ToCharArray(byte[])(System.Byte[] byteArray)

Converts an array of bytes to an array of chars

Parameters:
byteArray (System.Byte[]) - The array of bytes to convert
Returns:
System.Char[] - The new array of chars
Example

URShift(int, int)

System.Int32 URShift(int, int)(System.Int32 number, System.Int32 bits)

Performs an unsigned bitwise right shift with the specified number

Parameters:
number (System.Int32) - Number to operate on
bits (System.Int32) - Ammount of bits to shift
Returns:
System.Int32 - The resulting number from the shift operation
Example

URShift(int, long)

System.Int32 URShift(int, long)(System.Int32 number, System.Int64 bits)

Performs an unsigned bitwise right shift with the specified number

Parameters:
number (System.Int32) - Number to operate on
bits (System.Int64) - Ammount of bits to shift
Returns:
System.Int32 - The resulting number from the shift operation
Example

URShift(long, int)

System.Int64 URShift(long, int)(System.Int64 number, System.Int32 bits)

Performs an unsigned bitwise right shift with the specified number

Parameters:
number (System.Int64) - Number to operate on
bits (System.Int32) - Ammount of bits to shift
Returns:
System.Int64 - The resulting number from the shift operation
Example

URShift(long, long)

System.Int64 URShift(long, long)(System.Int64 number, System.Int64 bits)

Performs an unsigned bitwise right shift with the specified number

Parameters:
number (System.Int64) - Number to operate on
bits (System.Int64) - Ammount of bits to shift
Returns:
System.Int64 - The resulting number from the shift operation
Example