public void align ( final long alignByteNumber ) throws IOException { if ( this . bitBufferCount > 0 ) { this . writeBits ( 0 , JBBPBitNumber . decode ( 8 - this . bitBufferCount ) ) ; } if ( alignByteNumber > 0 ) { long padding = ( alignByteNumber - ( this . byteCounter % alignByteNumber ) ) % alignByteNumber ; while ( padding > 0 ) { this . out . write ( 0 ) ; this . byteCounter ++ ; padding -- ; } } }
Write padding bytes to align the stream counter for the border .