Java Integer to Byte int2byte(int i)

Here you can find the source of int2byte(int i)

Description

intbyte

License

Open Source License

Declaration

public static final byte[] int2byte(int i) 

Method Source Code

//package com.java2s;

public class Main {
    public static final byte[] int2byte(int i) {
        byte dest[] = new byte[4];
        dest[3] = (byte) (i & 0xff);
        dest[2] = (byte) (i >>> 8 & 0xff);
        dest[1] = (byte) (i >>> 16 & 0xff);
        dest[0] = (byte) (i >>> 24 & 0xff);
        return dest;
    }/*from  w  w w.  j av  a  2s.c  o m*/
}

Related

  1. asByte(int a)
  2. int2bcdByte(int hRadix10, int lRadix10)
  3. int2bin(byte[] out, int offset, int i)
  4. int2byte(byte[] output, int[] input, int len)
  5. int2byte(final int i)
  6. int2Byte(int intValue)
  7. int2byte(int ival, byte b[], int offset)
  8. int2byte(int value)
  9. int2byte(int[] ia)