Android Int to Byte Array Convert intToByteArray(int value)

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

Description

int To Byte Array

Declaration

public static final byte[] intToByteArray(int value) 

Method Source Code

//package com.java2s;

public class Main {
    public static final byte[] intToByteArray(int value) {
        return new byte[] { (byte) (value >>> 24), (byte) (value >>> 16),
                (byte) (value >>> 8), (byte) value };
    }//from   w  w  w  . j ava 2 s.c  o m
}

Related

  1. intFitsIn(final int value)
  2. intForByte(byte b)
  3. intToByte(int number)
  4. intToByteArray(int a)
  5. intToByteArray(int i)
  6. intToBytes(int i)
  7. intToBytes(int in)
  8. intToBytes(int n)
  9. intToBytes(int number)