C# Class Unplugged.IbmBits.BinaryReaderExtensionMethods

显示文件 Open project: jfoshee/UnpluggedIbmBits

Public Methods

Method Description
ReadInt16BigEndian ( this reader ) : Int16

Reads a 16-bit integer from the stream that has been encoded as big endian.

ReadInt32BigEndian ( this reader ) : Int32

Reads a 32-bit integer from the stream that has been encoded as big endian.

ReadPackedDecimalIbm ( this reader, byte storageLength, byte scale ) : decimal

Reads a pack decimal from the stream

ReadSingleIbm ( this reader ) : float

Reads a single precision 32-bit floating point number from the stream that has been encoded in IBM System/360 Floating Point format

ReadStringEbcdic ( this reader, int count ) : string

Reads the requested number of 8-bit EBCDIC encoded characters from the stream and converts them to a Unicode string.

Private Methods

Method Description
ReadBytes ( BinaryReader reader, int count ) : byte[]

Method Details

ReadInt16BigEndian() public static method

Reads a 16-bit integer from the stream that has been encoded as big endian.
public static ReadInt16BigEndian ( this reader ) : Int16
reader this
return System.Int16

ReadInt32BigEndian() public static method

Reads a 32-bit integer from the stream that has been encoded as big endian.
public static ReadInt32BigEndian ( this reader ) : Int32
reader this
return System.Int32

ReadPackedDecimalIbm() public static method

Reads a pack decimal from the stream
public static ReadPackedDecimalIbm ( this reader, byte storageLength, byte scale ) : decimal
reader this The reader from which the bytes will be read
storageLength byte The total storage length of the packed decimal
scale byte The scale of the decimal (number of number after the .)
return decimal

ReadSingleIbm() public static method

Reads a single precision 32-bit floating point number from the stream that has been encoded in IBM System/360 Floating Point format
public static ReadSingleIbm ( this reader ) : float
reader this
return float

ReadStringEbcdic() public static method

Reads the requested number of 8-bit EBCDIC encoded characters from the stream and converts them to a Unicode string.
public static ReadStringEbcdic ( this reader, int count ) : string
reader this
count int The number of bytes to read
return string