C# Класс Summer.Batch.Extra.Ebcdic.Encode.EbcdicDecoder

Decodes EBCDIC values to their corresponding C# objects.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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

Приватные методы

Метод Описание
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

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

Decode() публичный Метод

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
Результат object

EbcdicDecoder() публичный Метод

Custom constructor given encoding
public EbcdicDecoder ( Encoding encoding ) : System
encoding System.Text.Encoding
Результат System

EbcdicDecoder() публичный Метод

Custom constructor given encoding name
public EbcdicDecoder ( string encodingName ) : System
encodingName string
Результат System

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

Parses a packed number
public static ParsePacked ( byte bytes ) : decimal
bytes byte a byte array where a number has been pack encoded
Результат decimal

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

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
Результат decimal

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

Parses a Zoned number
public static ParseZoned ( string value ) : decimal
value string a string where a number has been zone encoded
Результат decimal