Java Integer to Byte Array intToByteArray(int pSrc, byte[] pDst, int pOffset)

Here you can find the source of intToByteArray(int pSrc, byte[] pDst, int pOffset)

Description

int To Byte Array

License

Open Source License

Declaration

public static void intToByteArray(int pSrc, byte[] pDst, int pOffset) 

Method Source Code

//package com.java2s;

public class Main {
    public static void intToByteArray(int pSrc, byte[] pDst, int pOffset) {
        pDst[pOffset] = (byte) (pSrc >>> 24);
        pDst[pOffset + 1] = (byte) (pSrc >>> 16);
        pDst[pOffset + 2] = (byte) (pSrc >>> 8);
        pDst[pOffset + 3] = (byte) pSrc;
    }/*ww w .jav a  2 s. c  om*/
}

Related

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