Java Integer to Byte Array fromIntToByteArray(int value)

Here you can find the source of fromIntToByteArray(int value)

Description

from Int To Byte Array

License

Apache License

Declaration

public static byte[] fromIntToByteArray(int value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static byte[] fromIntToByteArray(int value) {
        return new byte[] { (byte) (value >>> 24), (byte) (value >>> 16), (byte) (value >>> 8), (byte) value };
    }//from   www.j  a v  a2 s  .c  o  m
}

Related

  1. convertIntToByteArray(int value)
  2. convertIntToByteArray(int value, int numberOfBytes)
  3. convertIntToByteArray(int[] rgb)
  4. convertIntToBytes(int i)
  5. fromIntToByte(int integer)
  6. int2Arr(int var, byte[] arrayBytes, int startIndex)
  7. int2ByteLE(byte[] bytes, int value, int offset)
  8. int2bytes(int i)
  9. int2Bytes(int i, byte[] bytes, int offset)