Java Integer to Byte Array intToByteArray(int value)

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

Description

int To Byte Array

License

Open Source License

Declaration

private static byte[] intToByteArray(int value) 

Method Source Code

//package com.java2s;

public class Main {
    private static byte[] intToByteArray(int value) {
        return new byte[] { (byte) (value >>> 24), (byte) (value >>> 16),
                (byte) (value >>> 8), (byte) value };
    }/*ww  w . j  a  va  2  s . c o  m*/
}

Related

  1. intToByteArray(int integer)
  2. intToByteArray(int piValueToConvert, boolean pbBigEndian)
  3. intToByteArray(int pSrc, byte[] pDst, int pOffset)
  4. intToByteArray(int source)
  5. IntToByteArray(int val, byte[] buf, int offset)
  6. intToByteArray(int value)
  7. intToByteArray(int value)
  8. intToByteArray(int value)
  9. intToByteArray(int value)