Class SyntaxBin

java.lang.Object
org.kapott.hbci.datatypes.SyntaxDE
org.kapott.hbci.datatypes.SyntaxBin

public class SyntaxBin extends SyntaxDE
  • Constructor Details

    • SyntaxBin

      public SyntaxBin(String x, int minlen, int maxlen)
      See Also:
    • SyntaxBin

      public SyntaxBin(StringBuffer res, int minsize, int maxsize)
      See Also:
  • Method Details

    • expandNumber

      private static String expandNumber(String x)
      Parameters:
      x - the String representation of the number
      Returns:
      a String, where each "character" is one byte of the big-endian-byte-representation of the given number
    • expand

      private static String expand(String x)
      Parameters:
      x - the String to be converted
      Returns:
      the binary String representing the given value
      Throws:
      IllegalArgumentException - occurs when the first character of the given string is neither "N" nor "B"
    • init

      public void init(String x, int minlen, int maxlen)
      Overrides:
      init in class SyntaxDE
    • toString

      public String toString(int zero)
      Overrides:
      toString in class SyntaxDE
      Parameters:
      zero - Just a dummy argument to overload the toString method.
      Returns:
      A String containing the HBCI representation of this data element
      See Also:
    • getHeaderLen

      private int getHeaderLen(String st)
      Parameters:
      st - the string representing the complete datatype BIN
      Returns:
      the length of the header-field in this string (i.e. the number of bytes making the @len@ part of the string
    • parse

      private String parse(String st)
      Parameters:
      st - the content of an HBCI-BIN-datatype-field
      Returns:
      the "real" data wrapped into the given string
    • initData

      private void initData(StringBuffer res, int minsize, int maxsize)
    • init

      public void init(StringBuffer res, int minsize, int maxsize)
      Overrides:
      init in class SyntaxDE