Java Integer to Byte int2byte(int ival, byte b[], int offset)

Here you can find the source of int2byte(int ival, byte b[], int offset)

Description

intbyte

License

Open Source License

Declaration

public static void int2byte(int ival, byte b[], int offset) 

Method Source Code

//package com.java2s;

public class Main {
    /** *///from w  w w.jav  a 2 s  . c  om
    public static void int2byte(int ival, byte b[], int offset) {
        int bits = 32;

        for (int i = 0; i < 4; i++) {
            bits -= 8;
            b[offset + i] = (byte) ((ival >> bits) & 0xff);
        }
    }
}

Related

  1. int2bin(byte[] out, int offset, int i)
  2. int2byte(byte[] output, int[] input, int len)
  3. int2byte(final int i)
  4. int2byte(int i)
  5. int2Byte(int intValue)
  6. int2byte(int value)
  7. int2byte(int[] ia)
  8. int2ByteArray(int i)
  9. int2byteArray(int k, byte b[], int off)