SupportClass
SupportClass
Cocos2D.Compression.ZlibInheritance: 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 returnReturns:
System.Double
- The received valueExample
Identity(long)
System.Int64 Identity(long)(System.Int64 literal)
This method returns the literal value received
Parameters:
literal
(System.Int64) - The literal to returnReturns:
System.Int64
- The received valueExample
Identity(float)
System.Single Identity(float)(System.Single literal)
This method returns the literal value received
Parameters:
literal
(System.Single) - The literal to returnReturns:
System.Single
- The received valueExample
Identity(ulong)
System.UInt64 Identity(ulong)(System.UInt64 literal)
This method returns the literal value received
Parameters:
literal
(System.UInt64) - The literal to returnReturns:
System.UInt64
- The received valueExample
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 fromtarget
(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 convertedReturns:
System.Byte[]
- The new array of bytesExample
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 convertReturns:
System.Char[]
- The new array of charsExample
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 onbits
(System.Int32) - Ammount of bits to shiftReturns:
System.Int32
- The resulting number from the shift operationExample
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 onbits
(System.Int64) - Ammount of bits to shiftReturns:
System.Int32
- The resulting number from the shift operationExample
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 onbits
(System.Int32) - Ammount of bits to shiftReturns:
System.Int64
- The resulting number from the shift operationExample
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 onbits
(System.Int64) - Ammount of bits to shiftReturns:
System.Int64
- The resulting number from the shift operationExample