code: @Override
  	public void writeBits(int num, int bits) throws IOException
  	{
  		if(num > Integer.SIZE)
  			throw new IllegalArgumentException("Num is larger than the number of bits that can be held in bits. (" + num + " > " + Integer.SIZE + ')');
  		if(num <= 0)
  			throw new IllegalArgumentException("Num (" + num + ") is less than or equal to zero.");
  		checkState();
  		uncheckedWriteBits(num, bits);
  	}
docs: {@inheritDoc}