Beispiel #1
0
  public int encode(BerByteArrayOutputStream axdrOStream) throws IOException {

    int codeLength;

    if (code != null) {
      codeLength = code.length;
      for (int i = code.length - 1; i >= 0; i--) {
        axdrOStream.write(code[i]);
      }
    } else {
      codeLength = 0;
      codeLength += familyName.encode(axdrOStream);

      codeLength += initial.encode(axdrOStream);

      codeLength += givenName.encode(axdrOStream);
    }

    return codeLength;
  }
  public int encode(BerByteArrayOutputStream axdrOStream) throws IOException {

    int codeLength;

    if (code != null) {
      codeLength = code.length;
      for (int i = code.length - 1; i >= 0; i--) {
        axdrOStream.write(code[i]);
      }
    } else {
      codeLength = 0;
      codeLength += my_choice.encode(axdrOStream);

      codeLength += my_sequence.encode(axdrOStream);

      codeLength += visibleString.encode(axdrOStream);

      codeLength += octetString.encode(axdrOStream);

      codeLength += myNull.encode(axdrOStream);

      codeLength += generalizedTime.encode(axdrOStream);

      codeLength += enumerated.encode(axdrOStream);

      codeLength += bitString.encode(axdrOStream);

      codeLength += myBoolean.encode(axdrOStream);

      codeLength += myInteger2.encode(axdrOStream);

      codeLength += myInteger.encode(axdrOStream);
    }

    return codeLength;
  }