code: public int getMessageUserDataLengthOnSend() throws MAPException {
  
          try {
              switch (this.tcapDialog.getState()) {
                  case Idle:
                      ApplicationContextName acn = this.mapProviderImpl.getTCAPProvider().getDialogPrimitiveFactory()
                              .createApplicationContextName(this.appCntx.getOID());
  
                      TCBeginRequest tb = this.mapProviderImpl.encodeTCBegin(this.getTcapDialog(), acn, destReference,
                              origReference, this.extContainer, this.eriStyle, this.eriMsisdn, this.eriVlrNo);
                      return tcapDialog.getDataLength(tb);
  
                  case Active:
                      // Its Active send TC-CONTINUE
  
                      TCContinueRequest tc = this.mapProviderImpl.encodeTCContinue(this.getTcapDialog(), false, null, null);
                      return tcapDialog.getDataLength(tc);
  
                  case InitialReceived:
                      // Its first Reply to TC-Begin
  
                      ApplicationContextName acn1 = this.mapProviderImpl.getTCAPProvider().getDialogPrimitiveFactory()
                              .createApplicationContextName(this.appCntx.getOID());
  
                      tc = this.mapProviderImpl.encodeTCContinue(this.getTcapDialog(), true, acn1, this.extContainer);
                      return tcapDialog.getDataLength(tc);
              }
          } catch (TCAPSendException e) {
              throw new MAPException("TCAPSendException when getMessageUserDataLengthOnSend", e);
          }
  
          throw new MAPException("Bad TCAP Dialog state: " + this.tcapDialog.getState());
      }
docs: Return the MAP message length (in bytes) that will be after encoding if TC-BEGIN or TC-CONTINUE cases This value must not
  exceed getMaxUserDataLength() value
  
  @return