Java Integer Convert To fromInt(int key)

Here you can find the source of fromInt(int key)

Description

from Int

License

BSD License

Declaration

public static byte[] fromInt(int key) 

Method Source Code

//package com.java2s;
// BSD License (http://lemurproject.org/galago-license)

public class Main {
    public static byte[] fromInt(int key) {
        byte[] converted = new byte[4];
        converted[0] = (byte) ((key >>> 24) & 0xFF);
        converted[1] = (byte) ((key >>> 16) & 0xFF);
        converted[2] = (byte) ((key >>> 8) & 0xFF);
        converted[3] = (byte) (key & 0xFF);
        return converted;
    }//from www.  j a v a2 s.  co  m
}

Related

  1. fromInt(int i)
  2. fromint(int i)
  3. fromInt(int input)
  4. fromInt(int input)
  5. fromInt(int intValue)
  6. fromInt(int value)
  7. fromInt(int value)
  8. fromInt(int value)
  9. fromInt(int value, byte[] arr, int offset)