code: public int getExtensionLength()
      {
          if (!getExtensionBit())
              return 0;
  
          //the extension length comes after the RTP header, the CSRC list, and
          //after two bytes in the extension header called "defined by profile"
          int extLenIndex =  FIXED_HEADER_SIZE
                          + getCsrcCount()*4 + 2;
          
          return ((buffer.get(extLenIndex) << 8) | buffer.get(extLenIndex + 1) * 4);
      }
docs: Returns the length of the extensions currently added to this packet.
  
  @return the length of the extensions currently added to this packet.