Esempio n. 1
0
  public void encodeData(AsnOutputStream asnOs) throws CAPException {

    if (this.data == null)
      throw new CAPException(
          "Error while encoding the " + _PrimitiveName + ": data is not defined");

    if (this.data.length < this.minLength || this.data.length > this.maxLength)
      throw new CAPException(
          "Error while encoding the "
              + _PrimitiveName
              + ": data field length must be from "
              + this.minLength
              + " to "
              + this.maxLength
              + " octets");

    asnOs.write(this.data);
  }