Java Integer to Byte intToByte(int num)

Here you can find the source of intToByte(int num)

Description

int To Byte

License

Open Source License

Declaration

public static byte intToByte(int num) 

Method Source Code

//package com.java2s;

public class Main {

    public static byte intToByte(int num) {
        byte high = (byte) ((num >> 4) & 0x0F);
        byte low = (byte) (num & 0x0F);
        byte value = (byte) ((high << 4) + low);
        return value;
    }/*from  ww w .java 2s  .  c  o m*/
}

Related

  1. IntToByte(int i)
  2. intToByte(int i)
  3. intToByte(int i)
  4. intToByte(int i_Value)
  5. intToByte(int myInt)
  6. intToByte(int number)
  7. intToByte(int number)
  8. intToByte(int number, int byteLength)
  9. intToByte(int v, byte[] dest)