Java Integer to Byte intToByte(int v, byte[] dest)

Here you can find the source of intToByte(int v, byte[] dest)

Description

int To Byte

License

Open Source License

Declaration

public static final int intToByte(int v, byte[] dest) 

Method Source Code

//package com.java2s;

public class Main {
    public static final int intToByte(int v, byte[] dest) {
        int destOffset = 0;
        dest[destOffset++] = (byte) ((v >> 24) & 0xFF);
        dest[destOffset++] = (byte) ((v >> 16) & 0xFF);
        dest[destOffset++] = (byte) ((v >> 8) & 0xFF);
        dest[destOffset++] = (byte) (v & 0xFF);
        return destOffset;
    }/*from  w  w  w  .  j  a  v a  2 s  .  c om*/
}

Related

  1. intToByte(int myInt)
  2. intToByte(int num)
  3. intToByte(int number)
  4. intToByte(int number)
  5. intToByte(int number, int byteLength)
  6. intToByte(int value)
  7. intToByte(int value)
  8. intToByte(int[] values)
  9. intToByte4(int number)