Esempio n. 1
0
  public int write(DataOutputStream ostream) throws IOException {
    preWrite();
    int retVal = 0;

    {
      /** fix dependent sizes for header * */
    }

    {
      /** fix dependent sizes for StatusfieldCheckInstance * */
    }
    {
      /** fix dependent sizes for CaEntries* */
    }

    // write header
    if (header != null) retVal += header.write(ostream);
    // write length
    ostream.writeByte(length);
    retVal += 1;
    // write programIndex
    ostream.writeByte(programIndex);
    retVal += 1;
    // write txnId
    ostream.writeByte(txnId);
    retVal += 1;
    // write ltsid
    ostream.writeByte(ltsid);
    retVal += 1;
    // write programNumber
    ostream.writeShort(programNumber);
    retVal += 2;
    // write sourceId
    ostream.writeShort(sourceId);
    retVal += 2;
    // write caPmtCmdId
    ostream.writeByte(caPmtCmdId);
    retVal += 1;
    // write bf2
    ostream.writeShort(bf2.getValue());
    retVal += 2;
    // write StatusfieldCheckInstance
    if (StatusfieldCheckInstance != null) retVal += StatusfieldCheckInstance.write(ostream);
    // write CaEntries
    {
      ArrayList<CaPmtModeMsg> temp1 = CaEntries;
      for (int iIdx = 0; iIdx < temp1.getCount(); iIdx++) {
        CaPmtModeMsg temp2 = temp1.get(iIdx);
        if (temp2 != null) retVal += temp2.write(ostream);
      }
    }
    postWrite();
    return retVal;
  }
Esempio n. 2
0
  public int write(DataOutputStream ostream) throws IOException {
    preWrite();
    int retVal = 0;

    {
      /** fix dependent sizes for header * */
    }

    // write header
    if (header != null) retVal += header.write(ostream);
    // write length
    ostream.writeByte(length);
    retVal += 1;
    postWrite();
    return retVal;
  }