Android Int to Byte Array Convert int2ByteArray11(int value)

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

Description

int Byte Array

Declaration

public static byte int2ByteArray11(int value) 

Method Source Code

//package com.java2s;

public class Main {
    public static byte int2ByteArray11(int value) {
        byte[] b = new byte[1];
        for (int i = 0; i < 1; i++) {
            int offset = (b.length - 1 - i) * 8;
            b[i] = (byte) ((value >>> offset) & 0xFF);
        }/*from w w  w  .j a  va2 s  .c  om*/
        return b[0];
    }
}

Related

  1. getFourBytes(int i, byte[] target, int pos)
  2. splitInt(int value)
  3. int2Byte(int value)
  4. int2ByteArray(int value)
  5. int2ByteArray1(int value)
  6. int2ByteArray3(int value)
  7. int2byte(int input)
  8. int2byteWithInvert(int input)
  9. int2bytesBE(int val, byte[] b, int off)