コード例 #1
0
int network_information_table_section::write(DataOutputStream& ostream) { // throws IOException
    {   /** fix dependent sizes for tableHeader **/
    }

{   /** fix dependent sizes for subtableInstance **/ if ( subtableInstance != NULL ) {
            tableHeader->setSection_length((short)subtableInstance->getSize());
        }
    }


    int retVal= 0;
    // write tableHeader
    if ( tableHeader != NULL ) {
        retVal +=tableHeader->write(ostream);
    }
    // write bf2
    ostream.writeUI8(bf2);
    retVal +=1;
    // write subtableInstance
    if ( subtableInstance != NULL ) {
        retVal +=subtableInstance->write(ostream);
    }
    // write CRC
    ostream.writeUI32(CRC);
    retVal +=4;

    return retVal;
}
コード例 #2
0
int OpenSessionResponse::write(DataOutputStream& ostream) { // throws IOException





    int retVal= 0;
    // write length
    ostream.writeUI8(length);
    retVal +=1;
    // write resourceIdentifier
    ostream.writeUI32(resourceIdentifier);
    retVal +=4;
    // write sessionStatus
    ostream.writeUI8(sessionStatus);
    retVal +=1;
    // write sessionNb
    ostream.writeUI16(sessionNb);
    retVal +=2;

    return retVal;
}