Java Integer to Byte Array int2Bytes(int n, byte[] dst, int start)

Here you can find the source of int2Bytes(int n, byte[] dst, int start)

Description

int Bytes

License

Open Source License

Declaration

public static void int2Bytes(int n, byte[] dst, int start) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static void int2Bytes(int n, byte[] dst, int start) {
        dst[start] = (byte) (n & 0xff);
        dst[start + 1] = (byte) ((n & 0xff00) >> 8);
        dst[start + 2] = (byte) ((n & 0xff0000) >> 16);
        dst[start + 3] = (byte) ((n & 0xff000000) >> 24);
    }/*from w  w  w.j a  v a 2 s  . com*/
}

Related

  1. int2bytes(int i)
  2. int2Bytes(int i, byte[] bytes, int offset)
  3. int2bytes(int integer)
  4. int2bytes(int intValue)
  5. int2Bytes(int l, byte[] target, int offset)
  6. int2Bytes(int num)
  7. int2bytes(int num)
  8. int2Bytes(int num)
  9. int2bytes(int num)