Breaking a 32-bit value into bytes for an ArrayList
Assuming your list was defined elsewhere, you could append the bytes of value as follows. 

for(int i = 3; i &gt;= 0; i--) {
    list.add((byte)((value &gt;&gt;&gt; (i*8)) &amp; 0xFF));
}



It avoids pre-populating the arraylist
It avoids resetting the byte already stored
It avoids storing the shifted value back in value
It uses a logical right shift to avoid sign extension of negative integers