public char getDataLength ( ) { char length = 0 ; List < StunAttribute > attrs = getAttributes ( ) ; for ( StunAttribute att : attrs ) { int attLen = att . getDataLength ( ) + StunAttribute . HEADER_LENGTH ; // take attribute padding into account: attLen += ( 4 - ( attLen % 4 ) ) % 4 ; length += attLen ; } return length ; }
Returns the length of this message s body .