Java Integer to String int2Word(int val)

Here you can find the source of int2Word(int val)

Description

int Word

License

Open Source License

Declaration

public static byte[] int2Word(int val) 

Method Source Code

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

public class Main {
    public static byte[] int2Word(int val) {
        byte[] ret = new byte[2];

        int firstByte = (0x0000FF00 & val) >> 8;
        int secondByte = (0x000000FF & val);
        ret[0] = (byte) firstByte;
        ret[1] = (byte) secondByte;
        return (ret);
    }//from  w  ww .j  a v  a 2  s .  c o  m
}

Related

  1. int2String(int i)
  2. int2String(int i, int subNum)
  3. int2string(int n)
  4. int2string(int[] a)
  5. int2String(Integer int_obj)
  6. integerToString(Integer i)
  7. integerToString(Integer number)
  8. integerToString(Integer value)
  9. intToStr(int nValue)