code: public void encode(AsnOutputStream aos) throws EncodeException {
  
          if (this.localOperationCode == null && this.globalOperationCode == null)
              throw new EncodeException("Operation code: No Operation code set!");
  
          try {
              if (this.type == OperationCodeType.Local) {
                  aos.writeInteger(this.localOperationCode);
              } else if (this.type == OperationCodeType.Global) {
                  aos.writeObjectIdentifier(this.globalOperationCode);
              } else {
                  throw new EncodeException();
              }
  
          } catch (IOException e) {
              throw new EncodeException(e);
          } catch (AsnException e) {
              throw new EncodeException(e);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.protocols.ss7.tcap.asn.Encodable#encode(org.mobicents.protocols .asn.AsnOutputStream)