C# Class Summer.Batch.Extra.Ebcdic.Encode.EbcdicDecoder

Decodes EBCDIC values to their corresponding C# objects.
Afficher le fichier Open project: SummerBatch/SummerBatch Class Usage Examples

Méthodes publiques

Méthode Description
Decode ( byte bytes, Summer.Batch.Extra.Copybook.FieldFormat fieldFormat ) : object

Main decode method. Switch based on the given FieldFormat

EbcdicDecoder ( Encoding encoding ) : System

Custom constructor given encoding

EbcdicDecoder ( string encodingName ) : System

Custom constructor given encoding name

ParsePacked ( byte bytes ) : decimal

Parses a packed number

ParsePacked ( byte bytes, int start, int end ) : decimal

Parses a packed number

ParseZoned ( string value ) : decimal

Parses a Zoned number

Private Methods

Méthode Description
DecodeHex ( byte bytes ) : string

Decode byte array as hexadecimal

DecodePacked ( byte bytes, Summer.Batch.Extra.Copybook.FieldFormat fieldFormat ) : decimal

Decode a byte array using the packed format

DecodeZoned ( byte bytes, Summer.Batch.Extra.Copybook.FieldFormat fieldFormat ) : decimal

Decode a byte array using the zoned format

GetLastIndex ( char lastChar, bool &positive ) : string
ScaleResult ( Summer.Batch.Extra.Copybook.FieldFormat fieldFormat, decimal result ) : decimal

Scale result using the given fieldFormat

Method Details

Decode() public méthode

Main decode method. Switch based on the given FieldFormat
 
public Decode ( byte bytes, Summer.Batch.Extra.Copybook.FieldFormat fieldFormat ) : object
bytes byte
fieldFormat Summer.Batch.Extra.Copybook.FieldFormat
Résultat object

EbcdicDecoder() public méthode

Custom constructor given encoding
public EbcdicDecoder ( Encoding encoding ) : System
encoding System.Text.Encoding
Résultat System

EbcdicDecoder() public méthode

Custom constructor given encoding name
public EbcdicDecoder ( string encodingName ) : System
encodingName string
Résultat System

ParsePacked() public static méthode

Parses a packed number
public static ParsePacked ( byte bytes ) : decimal
bytes byte a byte array where a number has been pack encoded
Résultat decimal

ParsePacked() public static méthode

Parses a packed number
public static ParsePacked ( byte bytes, int start, int end ) : decimal
bytes byte a byte array where a number has been pack encoded
start int the beginning index, inclusive
end int the end index, exclusive
Résultat decimal

ParseZoned() public static méthode

Parses a Zoned number
public static ParseZoned ( string value ) : decimal
value string a string where a number has been zone encoded
Résultat decimal