public static void writeIntToByteArray(byte[] buf, int offset, int value) {
    """
	Outputs an int into a byte array.
	
	@param buf    The byte array to write to.
	@param offset The offset within the byte array to output the int.
	@param value  The int value to write into the array.
    """
        buf[offset++] = (byte) (value & 0x000000ff);
        buf[offset++] = (byte) ((value & 0x0000ff00) >> 8);
        buf[offset++] = (byte) ((value & 0x00ff0000) >> 16);
        buf[offset] = (byte) ((value & 0xff000000) >> 24);
    }
public static void writeIntToByteArray(byte[] buf, int offset, int value)
    {
        buf[offset++] = (byte) (value & 0x000000ff);
        buf[offset++] = (byte) ((value & 0x0000ff00) >> 8);
        buf[offset++] = (byte) ((value & 0x00ff0000) >> 16);
        buf[offset] = (byte) ((value & 0xff000000) >> 24);
    }
public static void writeIntToByteArray ( byte [ ] buf , int offset , int value ) { buf [ offset ++ ] = ( byte ) ( value & 0x000000ff ) ; buf [ offset ++ ] = ( byte ) ( ( value & 0x0000ff00 ) >> 8 ) ; buf [ offset ++ ] = ( byte ) ( ( value & 0x00ff0000 ) >> 16 ) ; buf [ offset ] = ( byte ) ( ( value & 0xff000000 ) >> 24 ) ; }
Outputs an int into a byte array.

@param buf    The byte array to write to.
@param offset The offset within the byte array to output the int.
@param value  The int value to write into the array.
Outputs an int into a byte array .