Java Integer to Byte Array intToBytes(final int i)

Here you can find the source of intToBytes(final int i)

Description

int To Bytes

License

Open Source License

Declaration

public static byte[] intToBytes(final int i) 

Method Source Code

//package com.java2s;

public class Main {
    public static byte[] intToBytes(final int i) {
        return new byte[] { (byte) (i >>> 24), (byte) (i >>> 16), (byte) (i >>> 8), (byte) i };
    }/* w  ww . jav  a2  s  .c om*/
}

Related

  1. intToByteLittleEnding(int j)
  2. intToByteMSB(int in)
  3. intToBytes(byte[] arr, int offset, int num)
  4. intToBytes(byte[] bytes, int index, int value)
  5. intToBytes(final int aInt)
  6. intToBytes(final int integer, final int bLength)
  7. intToBytes(final int number)
  8. intToBytes(final int value)
  9. intTobytes(final int value)