• API Overview
  • EBICS API
  • FinTS API
  • XS2A API
  • SEPA API
Search Results for

    Class FinSegmentBuffer

    A binary byte buffer that holds the raw data of a single HBCI segment.

    Inheritance
    System.Object
    FinByteBuffer
    FinSegmentBuffer
    Inherited Members
    FinByteBuffer.Bytes
    FinByteBuffer.Item[Int32]
    FinByteBuffer.Offset
    FinByteBuffer.Length
    FinByteBuffer.Capacity
    FinByteBuffer.Reserve
    FinByteBuffer.AppendByte(Byte)
    FinByteBuffer.AppendBytes(Byte, Int32)
    FinByteBuffer.AppendByteArray(Byte[], Int32, Int32)
    FinByteBuffer.AppendByteArray(Byte[])
    FinByteBuffer.AppendByteBuffer(FinByteBuffer)
    FinByteBuffer.AppendString(String)
    FinByteBuffer.AppendInteger(Int32, Int32)
    FinByteBuffer.AppendByteStream(Stream, Int32)
    FinByteBuffer.OpenRead()
    FinByteBuffer.ToArray()
    FinByteBuffer.ToString(Encoding)
    FinByteBuffer.Clone()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Subsembly.FinTS
    Assembly: Subsembly.FinTS.Core.dll
    Syntax
    public class FinSegmentBuffer : FinByteBuffer
    Remarks

    This is a very low level class that supports the implementation of the higher level FinSegment class. Applications usually only have to deal with the higher level class and never with instances of this class.

    Properties

    Header

    Returns the parsed segment header or null, if there's no data.

    Declaration
    public FinSegmentHeader Header { get; }
    Property Value
    Type Description
    FinSegmentHeader

    SegmentType

    The segment type of the segment contained in this segment buffer.

    Declaration
    public string SegmentType { get; }
    Property Value
    Type Description
    System.String
    Remarks

    If this segment buffer is completely empty, then null will be returned. If the segment buffer starts with a special delimiter character, then an empty string is returned.

    Exceptions
    Type Condition
    FinParseException

    Is thrown if a segment type could not be extracted. This will be the case if no delimiter could be found.

    SegNo

    The segment number of the segment contained in this segment buffer.

    Declaration
    public int? SegNo { get; }
    Property Value
    Type Description
    System.Nullable<System.Int32>
    Remarks

    If this segment buffer is completely empty, then null will be returned. There's no(!) value check for the SegNo - the returned SegNo might exceed 999.

    Exceptions
    Type Condition
    FinParseException

    Is thrown if a segment number could not be extracted. This will be the case if no delimiter could be found.

    Version

    The segment version of the segment contained in this segment buffer.

    Declaration
    public int? Version { get; }
    Property Value
    Type Description
    System.Nullable<System.Int32>
    Remarks

    If this segment buffer is completely empty, then null will be returned. There's no(!) value check for the Version - the returned Version might exceed 999.

    Exceptions
    Type Condition
    FinParseException

    Is thrown if a segment version could not be extracted. This will be the case if no delimiter could be found.

    Methods

    Read(Stream, Int32, Boolean)

    Reads a complete HBCI segment from the given stream into a FinSegmentBuffer and returns it.

    Declaration
    public static FinSegmentBuffer Read(Stream aStream, int nMaxSize, bool fSkipLeadingWhitespace)
    Parameters
    Type Name Description
    System.IO.Stream aStream

    Stream to read segment data from.

    System.Int32 nMaxSize

    The maximum size of the segment to be read. If the segment exceeds this limit, then a FinParseException will be thrown.

    System.Boolean fSkipLeadingWhitespace
    Returns
    Type Description
    FinSegmentBuffer

    If a complete segment was successfully read from the stream, then a FinSegmentBuffer instance that contains the segment bytes is returned. If the stream is at its end before any segment byte was read, then null is returned.

    Exceptions
    Type Condition
    FinParseException

    If the input stream does not provide syntactically valid FinTS segment data, then a FinParseException is thrown. Syntactically valid means, that the input stream could be dissected into data elements and was properly terminated by a segment delimiter. The content of the data elements is completely irrelevant.

    Scan(FinByteBuffer)

    Declaration
    public static FinSegmentBuffer Scan(FinByteBuffer aBuffer)
    Parameters
    Type Name Description
    FinByteBuffer aBuffer
    Returns
    Type Description
    FinSegmentBuffer

    Scan(Byte[])

    Declaration
    public static FinSegmentBuffer Scan(byte[] vbBytes)
    Parameters
    Type Name Description
    System.Byte[] vbBytes
    Returns
    Type Description
    FinSegmentBuffer

    Scan(Byte[], Int32, Int32)

    Scans a segment from a byte array and wraps it with a FinSegmentBuffer without copying data.

    Declaration
    public static FinSegmentBuffer Scan(byte[] vbBytes, int nOffset, int nLength)
    Parameters
    Type Name Description
    System.Byte[] vbBytes
    System.Int32 nOffset
    System.Int32 nLength
    Returns
    Type Description
    FinSegmentBuffer
    Exceptions
    Type Condition
    FinParseException

    If the input stream does not provide syntactically valid FinTS segment data, then a FinParseException is thrown. Syntactically valid means, that the input stream could be dissected into data elements and was properly terminated by a segment delimiter. The content of the data elements is completely irrelevant.

    ToString()

    Converts the content of this segment buffer into a readable string for diagnostic purposes.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    FinByteBuffer.ToString()
    Remarks

    All data elements that are known to be security critical are masked out with bullet characters in the returned string. Also, the complete data contained in a HNVSD segment is masked out with bullets.

    In This Article
    Back to top Copyright 2009-2025 Subsembly GmbH