Java Integer to int2BigEndianStr(int i)

Here you can find the source of int2BigEndianStr(int i)

Description

int Big Endian Str

License

Open Source License

Declaration

public static byte[] int2BigEndianStr(int i) 

Method Source Code

//package com.java2s;

public class Main {

    public static byte[] int2BigEndianStr(int i) {
        byte[] result = new byte[4];
        result[3] = (byte) ((i >> 24) & 0xFF);
        result[2] = (byte) ((i >> 16) & 0xFF);
        result[1] = (byte) ((i >> 8) & 0xFF);
        result[0] = (byte) (i & 0xFF);
        return result;
    }// ww w  . j a v  a2s.c  om
}

Related

  1. int2(final int x)
  2. int2(StringBuilder buf, int i)
  3. int2ABC(int index)
  4. int2array(int sz, int seed)
  5. int2ba(int integer)
  6. int2buff(int n)
  7. int2Char(int i)
  8. int2Date(Integer date, String interval)
  9. int2ddouble(final int i)