C# Class Unplugged.IbmBits.IbmConverter

Afficher le fichier Open project: jfoshee/UnpluggedIbmBits Class Usage Examples

Méthodes publiques

Méthode Description
GetBytes ( System.Single value ) : byte[]

Given a 32-bit IEEE single precision floating point number, returns four bytes encoding a single precision number in IBM System/360 Floating Point format

GetBytes ( decimal originalValue ) : byte[]

Convert the decimal value into its packed value

James Howey Copyright (c) Microsoft Corporation. All rights reserved. Microsoft Shared Source Permissive License

GetBytes ( int value ) : byte[]
GetBytes ( short value ) : byte[]

Returns two bytes encoding a big endian 16-bit signed integer given a 16-bit signed integer

GetBytes ( string value ) : byte[]

Returns a byte array of EBCDIC encoded characters converted from a Unicode string

GetBytes ( string value, int startingIndex ) : byte[]

Returns a byte array of EBCDIC encoded characters converted from a Unicode substring starting at the specified position

GetBytes ( string value, int startingIndex, int length ) : byte[]

Returns a byte array of EBCDIC encoded characters converted from a Unicode substring starting at the specified position with the given length

ToInt16 ( byte value ) : Int16

Returns a 16-bit signed integer converted from two bytes encoding a big endian 16-bit signed integer

ToInt16 ( byte value, int startIndex ) : Int16

Returns a 16-bit signed integer converted from two bytes in a specified position encoding a big endian 16-bit signed integer

ToInt32 ( byte value, int startIndex ) : Int32

Returns a 32-bit signed integer converted from four bytes at a specified position encoding a big endian 32-bit signed integer

ToInt32 ( byte value ) : int

Returns a 32-bit signed integer converted from four bytes encoding a big endian 32-bit signed integer

ToSingle ( byte value ) : System.Single

Returns a 32-bit IEEE single precision floating point number from four bytes encoding a single precision number in IBM System/360 Floating Point format

ToString ( byte value ) : string

Returns a Unicode string converted from a byte array of EBCDIC encoded characters

ToString ( byte value, int startingIndex ) : string

Returns a Unicode string converted from a byte array of EBCDIC encoded characters starting at the specified position

ToString ( byte value, int startingIndex, int length ) : string

Returns a Unicode string converted from a byte array of EBCDIC encoded characters starting at the specified position of the given length

ToUnpackedDecimal ( byte inputData, int scale ) : Decimal

Unpack the byte array into a decimal

From the java version made by p4w3l located here : http://cobol2j.cvs.sourceforge.net/viewvc/cobol2j/cobol2j/src/main/java/net/sf/cobol2j/RecordSet.java?revision=1.25&view=markup from the open source projet cobol2j at http://sourceforge.net/projects/cobol2j/ under LGPLV2

Method Details

GetBytes() public static méthode

Given a 32-bit IEEE single precision floating point number, returns four bytes encoding a single precision number in IBM System/360 Floating Point format
public static GetBytes ( System.Single value ) : byte[]
value System.Single
Résultat byte[]

GetBytes() public static méthode

Convert the decimal value into its packed value
James Howey Copyright (c) Microsoft Corporation. All rights reserved. Microsoft Shared Source Permissive License
public static GetBytes ( decimal originalValue ) : byte[]
originalValue decimal The value to pack
Résultat byte[]

GetBytes() public static méthode

public static GetBytes ( int value ) : byte[]
value int
Résultat byte[]

GetBytes() public static méthode

Returns two bytes encoding a big endian 16-bit signed integer given a 16-bit signed integer
public static GetBytes ( short value ) : byte[]
value short
Résultat byte[]

GetBytes() public static méthode

Returns a byte array of EBCDIC encoded characters converted from a Unicode string
public static GetBytes ( string value ) : byte[]
value string
Résultat byte[]

GetBytes() public static méthode

Returns a byte array of EBCDIC encoded characters converted from a Unicode substring starting at the specified position
public static GetBytes ( string value, int startingIndex ) : byte[]
value string
startingIndex int /// Zero-based starting index of substring ///
Résultat byte[]

GetBytes() public static méthode

Returns a byte array of EBCDIC encoded characters converted from a Unicode substring starting at the specified position with the given length
public static GetBytes ( string value, int startingIndex, int length ) : byte[]
value string
startingIndex int /// Zero-based starting index of substring ///
length int /// Number of characters to convert ///
Résultat byte[]

ToInt16() public static méthode

Returns a 16-bit signed integer converted from two bytes encoding a big endian 16-bit signed integer
public static ToInt16 ( byte value ) : Int16
value byte
Résultat System.Int16

ToInt16() public static méthode

Returns a 16-bit signed integer converted from two bytes in a specified position encoding a big endian 16-bit signed integer
public static ToInt16 ( byte value, int startIndex ) : Int16
value byte
startIndex int
Résultat System.Int16

ToInt32() public static méthode

Returns a 32-bit signed integer converted from four bytes at a specified position encoding a big endian 32-bit signed integer
public static ToInt32 ( byte value, int startIndex ) : Int32
value byte
startIndex int
Résultat System.Int32

ToInt32() public static méthode

Returns a 32-bit signed integer converted from four bytes encoding a big endian 32-bit signed integer
public static ToInt32 ( byte value ) : int
value byte
Résultat int

ToSingle() public static méthode

Returns a 32-bit IEEE single precision floating point number from four bytes encoding a single precision number in IBM System/360 Floating Point format
public static ToSingle ( byte value ) : System.Single
value byte
Résultat System.Single

ToString() public static méthode

Returns a Unicode string converted from a byte array of EBCDIC encoded characters
public static ToString ( byte value ) : string
value byte
Résultat string

ToString() public static méthode

Returns a Unicode string converted from a byte array of EBCDIC encoded characters starting at the specified position
public static ToString ( byte value, int startingIndex ) : string
value byte
startingIndex int /// Zero-based index of starting position in value array ///
Résultat string

ToString() public static méthode

Returns a Unicode string converted from a byte array of EBCDIC encoded characters starting at the specified position of the given length
public static ToString ( byte value, int startingIndex, int length ) : string
value byte
startingIndex int /// Zero-based index of starting position in value array ///
length int /// Number of characters to convert ///
Résultat string

ToUnpackedDecimal() public static méthode

Unpack the byte array into a decimal
From the java version made by p4w3l located here : http://cobol2j.cvs.sourceforge.net/viewvc/cobol2j/cobol2j/src/main/java/net/sf/cobol2j/RecordSet.java?revision=1.25&view=markup from the open source projet cobol2j at http://sourceforge.net/projects/cobol2j/ under LGPLV2
public static ToUnpackedDecimal ( byte inputData, int scale ) : Decimal
inputData byte
scale int
Résultat Decimal