C# Класс Ohana3DS_Transfigured.Ohana.IOUtils

Показать файл Открыть проект

Открытые методы

Метод Описание
endianSwap ( uint value ) : uint

Converts a value from Little to Big or Big to Little endian.

readString ( BinaryReader input, uint address, bool advancePosition = false ) : string

Read an ASCII String from a given Reader at a given address. Note that the text MUST end with a Null Terminator (0x0). It doesn't advances the position after reading.

readString ( BinaryReader input, uint address, uint count ) : string

Read an ASCII String from a given Reader at a given address with given size. It will also stop reading if a Null Terminator (0x0) is found. It WILL advance the position until the count is reached, or a 0x0 is found.

readStringWithLength ( BinaryReader input, uint count ) : string

Read an ASCII String from a given Reader with given size. It will also stop reading if a Null Terminator (0x0) is found. It WILL advance the position until the count is reached, or a 0x0 is found.

signExtend ( int value, int bits ) : int

Sign extends the value, so it will keep the sign flag.

signExtend ( uint value, int bits ) : int

Sign extends the value, so it will keep the sign flag.

Описание методов

endianSwap() публичный статический Метод

Converts a value from Little to Big or Big to Little endian.
public static endianSwap ( uint value ) : uint
value uint The value to be swapped
Результат uint

readString() публичный статический Метод

Read an ASCII String from a given Reader at a given address. Note that the text MUST end with a Null Terminator (0x0). It doesn't advances the position after reading.
public static readString ( BinaryReader input, uint address, bool advancePosition = false ) : string
input System.IO.BinaryReader The Reader of the File Stream
address uint Address where the text begins
advancePosition bool
Результат string

readString() публичный статический Метод

Read an ASCII String from a given Reader at a given address with given size. It will also stop reading if a Null Terminator (0x0) is found. It WILL advance the position until the count is reached, or a 0x0 is found.
public static readString ( BinaryReader input, uint address, uint count ) : string
input System.IO.BinaryReader The Reader of the File Stream
address uint Address where the text begins
count uint Number of bytes that the text have
Результат string

readStringWithLength() публичный статический Метод

Read an ASCII String from a given Reader with given size. It will also stop reading if a Null Terminator (0x0) is found. It WILL advance the position until the count is reached, or a 0x0 is found.
public static readStringWithLength ( BinaryReader input, uint count ) : string
input System.IO.BinaryReader The Reader of the File Stream
count uint Number of bytes that the text have
Результат string

signExtend() публичный статический Метод

Sign extends the value, so it will keep the sign flag.
public static signExtend ( int value, int bits ) : int
value int The value that should be sign-extended
bits int Number of bits that the value have
Результат int

signExtend() публичный статический Метод

Sign extends the value, so it will keep the sign flag.
public static signExtend ( uint value, int bits ) : int
value uint The value that should be sign-extended
bits int Number of bits that the value have
Результат int