petite/src/wombat/scheme/util/Conversion.java
public static byte[] int2byte(int[] src) {
	    int srcLength = src.length;
	    byte[] dst = new byte[srcLength << 2];
	    
	    for (int i = 0; i < srcLength; i++) {
	        int x = src[i];
	        int j = i << 2;
	        dst[j++] = (byte) ((x >>> 0) & 0xff);           
	        dst[j++] = (byte) ((x >>> 8) & 0xff);
	        dst[j++] = (byte) ((x >>> 16) & 0xff);
	        dst[j++] = (byte) ((x >>> 24) & 0xff);
	    }
	    return dst;
	}
/**
	 * Pull apart int arrays to a byte array.
	 * @param src The original int array.
	 * @return The returned byte.
	 */
Pull apart int arrays to a byte array.
@param src The original int array.
@return The returned byte.
Pull apart int arrays to a byte array . @param src The original int array . @return The returned byte .
public static byte[] int2byte(int[] src) {
	    int srcLength = src.length;
	    byte[] dst = new byte[srcLength << 2];
	    for (int i = 0; i < srcLength; i++) {
	        int x = src[i];
	        int j = i << 2;
	        dst[j++] = (byte) ((x >>> 0) & 0xff);           
	        dst[j++] = (byte) ((x >>> 8) & 0xff);
	        dst[j++] = (byte) ((x >>> 16) & 0xff);
	        dst[j++] = (byte) ((x >>> 24) & 0xff);
	    }
	    return dst;
	}
public static byte [ ] int2byte ( int [ ] src ) { int srcLength = src . length ; byte [ ] dst = new byte [ srcLength << 2 ] ; for ( int i = 0 ; i < srcLength ; i ++ ) { int x = src [ i ] ; int j = i << 2 ; dst [ j ++ ] = ( byte ) ( ( x >>> 0 ) & 0xff ) ; dst [ j ++ ] = ( byte ) ( ( x >>> 8 ) & 0xff ) ; dst [ j ++ ] = ( byte ) ( ( x >>> 16 ) & 0xff ) ; dst [ j ++ ] = ( byte ) ( ( x >>> 24 ) & 0xff ) ; } return dst ; }
Pull apart int arrays to a byte array.
Pull apart int arrays to a byte array .