Before any packet data is written to the bit stream (even in simulation /// mode) the complete header should be written otherwise incorrect estimates /// are given by getMaxAvailableBytes() for rate allocation. /// ///
If the length of the data that is to be written to the bit stream is /// more than the space left (as returned by getMaxAvailableBytes()) only /// the data that does not exceed the allowed length is written, the rest /// is discarded. However the value returned by the method is the total /// length of the packet, as if all of it was written to the bit stream. /// ///
If the bit stream header has not been commited yet and 'sim' is /// false, then the bit stream header is automatically commited (see /// commitBitstreamHeader() method) before writting the packet. /// ///
If the length of the data that is to be written to the bit stream is /// more than the space left (as returned by getMaxAvailableBytes()) only /// the data that does not exceed the allowed length is written, the rest /// is discarded. However the value returned by the method is the total /// length of the packet body , as if all of it was written to the bit /// stream. /// ///