public boolean padToByte ( ) { boolean padded = false ; EncodedElement end = EncodedElement . getEnd_S ( this ) ; int tempVal = end . usableBits ; if ( tempVal % 8 != 0 ) { int toWrite = 8 - ( tempVal % 8 ) ; end . addInt ( 0 , toWrite ) ; /* Assert FOR DEVEL ONLY: */ assert ( ( this . getTotalBits ( ) + offset ) % 8 == 0 ) ; padded = true ; } return padded ; }
Force the usable data stored in this list ends on a a byte boundary by padding to the end with zeros .