Class FinDtaParser

Namespace
Subsembly.FinTS
Assembly
Subsembly.FinTS.Core.dll
public class FinDtaParser : FinDtaBase
Inheritance
FinDtaParser
Inherited Members

Constructors

FinDtaParser(FinByteBuffer, int)

public FinDtaParser(FinByteBuffer aDtausBuffer, int nHandbookVersion = 0)

Parameters

aDtausBuffer FinByteBuffer

Provides the raw binary DTAUS data to be processed by this FinDtaParser instance. This parameter must not be null, but the buffer may be empty.

nHandbookVersion int

Obsolete and ignored.

Exceptions

ArgumentNullException

The parameter aDtausBuffer was null.

ArgumentOutOfRangeException

The parameter nHandbookVersion is less than zero.

ArgumentException

The length of the provided data buffer was not a muplitiple of the block size of 128 bytes.

Properties

BuildDate

The build date from field A7 from the most recent record A.

public DateTime BuildDate { get; }

Property Value

DateTime

If no record A was read so far, then this property has the value DateTime.MinValue.

OrderingCustAcct

The ordering customer account information from record A.

public FinAcct OrderingCustAcct { get; }

Property Value

FinAcct

Remarks

When a record A is read by ReadRecordA(), then a new FinAcct instance is created and stored in this property. The new FinAcct is initialised as follows: The AcctNo is extracted from field A9. The BankCode is extracted from field A4. The CountryCode is set to "280". The HolderName is extracted from field A6. The Currency is set to "EUR".

RecordSize

Indicates the logical record size of the next record to be read.

public int RecordSize { get; }

Property Value

int

If the input is exhausted, then this will be zero.

RecordType

Indicates the type of the next record to be read.

public char RecordType { get; }

Property Value

char

This is a NUL character if the input is exhausted.

ReferenceNo

The reference number from field A10 from the most recent record A.

public string ReferenceNo { get; }

Property Value

string

Remarks

If no record A has been read so far, then this property has the value null.

ScheduleDate

The schedule date from field A11b from the most recent record A.

public DateTime ScheduleDate { get; }

Property Value

DateTime

If no schedule date was set in the DTAUS file, or no record A was read so far, then this property has the value DateTime.MinValue.

Type

This is the type of the currently parsed DTAUS file as extracted from field A3.

public FinDtaBase.DtausType Type { get; }

Property Value

FinDtaBase.DtausType

Remarks

If no record A has been read so far, then this property has the value Null.

Methods

ReadDTAUS(FinByteBuffer)

Reads a complete DTAUS file from a data buffer.

public static FinRemitt[] ReadDTAUS(FinByteBuffer aDtaBuffer)

Parameters

aDtaBuffer FinByteBuffer

Binary buffer that contains the DTAUS data to be parsed.

Returns

FinRemitt[]

All C records that are read from the DTAUS data buffer are converted into FinRemitt instances. After the complete buffer has been parsed, an array of FinRemitt instances is returned. The returned array may be empty if the file did not contain any C records or even was completely empty. The return value is never null.

Exceptions

ArgumentNullException

The parameter aDtaBuffer was null.

ReadDTAUS(string)

Reads a complete DTAUS file.

public static FinRemitt[] ReadDTAUS(string sFileName)

Parameters

sFileName string

File name of DTAUS file to be read. This file may even consist of multiple logical files.

Returns

FinRemitt[]

All C records that are read from the DTAUS file are converted into FinRemitt instances. After the complete file has been read an array of FinRemitt instances is returned. The returned array may be empty if the file did not contain any C records or even was completely empty. The return value is never null.

Exceptions

ArgumentNullException

The parameter sFileName was null.

ArgumentException

The parameter sFileName was an empty string.

ReadDTAZV(FinByteBuffer)

Reads a complete DTAZV file from a data buffer.

public static FinIntRemitt[] ReadDTAZV(FinByteBuffer aDtaBuffer)

Parameters

aDtaBuffer FinByteBuffer

Binary buffer that contains the DTAZV data to be parsed.

Returns

FinIntRemitt[]

All T records that are read from the DTAZV data buffer are converted into FinIntRemitt instances. After the complete buffer has been parsed, an array of FinIntRemitt instances is returned. The returned array may be empty if the file did not contain any T records or even was completely empty. The return value is never null.

Exceptions

ArgumentNullException

The parameter aDtaBuffer was null.

ReadDTAZV(string)

Reads a complete DTAZV file.

public static FinIntRemitt[] ReadDTAZV(string sFileName)

Parameters

sFileName string

File name of DTAZV file to be read. This file may even consist of multiple logical files.

Returns

FinIntRemitt[]

All T records that are read from the DTAZV file are converted into FinIntRemitt instances. After the complete file has been read an array of FinIntRemitt instances is returned. The returned array may be empty if the file did not contain any T records or even was completely empty. The return value is never null.

Exceptions

ArgumentNullException

The parameter sFileName was null.

ArgumentException

The parameter sFileName was an empty string.

ReadRecordA()

Reads a DTAUS record A from the input data.

public bool ReadRecordA()

Returns

bool

If the input data is already exhausted when this method is called, then false is returned. If a record A was read, then true is returned. Any error in the input data will cause an exception to be thrown.

ReadRecordC(out string)

Reads a DTAUS record C from the input data.

public FinRemitt ReadRecordC(out string sCustNumber)

Parameters

sCustNumber string

Through this out parameter the complete content of field C6 (all 13 digits) are returned.

Returns

FinRemitt

The data from the C record is collected in a new FinRemitt instance which is returned by this method. If an immediate end of data was encountered, then null is returned.

ReadRecordE()

public bool ReadRecordE()

Returns

bool

ReadRecordQ()

public bool ReadRecordQ()

Returns

bool

If the input data is already exhausted when this method is called, then false is returned. If a record Q was read, then true is returned.

Exceptions

FinDtaException

The input data doesn't start with a DTAZV record Q header.

ReadRecordT(out long)

Reads a DTAZV record T from the input data.

public FinIntRemitt ReadRecordT(out long nRecordCount)

Parameters

nRecordCount long

If the return value differs from null, this value holds the number of U-, V- or W-records.

Returns

FinIntRemitt

The data from the T record is collected in a new FinIntRemitt instance which is returned by this method. If an immediate end of data was encountered, then null is returned.

Exceptions

FinDtaException

The input data doesn't start with a DTAZV record T header.

ReadRecordV()

Just reads (and skips) a complete DTAZV record V.

public bool ReadRecordV()

Returns

bool

If the input data is already exhausted when this method is called, then false is returned. If a record V was read, then true is returned.

Exceptions

FinDtaException

The input data doesn't start with a DTAZV record V header.

ReadRecordW()

Just reads (and skips) a complete DTAZV record W.

public bool ReadRecordW()

Returns

bool

If the input data is already exhausted when this method is called, then false is returned. If a record W was read, then true is returned.

Exceptions

FinDtaException

The input data doesn't start with a DTAZV record W header.

ReadRecordZ()

Reads a complete Z record and validates total amount/total count.

public bool ReadRecordZ()

Returns

bool

If the input data is already exhausted when this method is called, then false is returned. If a record Z was read, then true is returned.

Exceptions

FinDtaException

The input data doesn't start with a DTAZV record Z header. The calculated total amount (over all T records) differs from the total amount from the Z record (checksum error). The number of read T records differs from the total count field in this Z record (checksum error).

Reset()

Resets the properties and the check sums, but not the input offset.

public void Reset()