Java Integer to intToUByte(int i)

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

Description

int To U Byte

License

Open Source License

Declaration

public static byte intToUByte(int i) 

Method Source Code

//package com.java2s;

public class Main {
    public static byte intToUByte(int i) {
        if ((i > 255) || (i < 0))
            throw new RuntimeException("can't convert " + i + " to an unsigned byte");
        return (byte) i;
    }//  w ww  .  ja  v  a  2  s.  c  o m
}

Related

  1. intToTriplePlace(int i)
  2. intToTwoByte(int value, byte[] destination, int offset)
  3. intToTwoBytes(int value)
  4. intToTwoDigitString(int integer)
  5. intToTwoHexString(final int value)
  6. intToULong(int signed)
  7. intToUnsigned(int signed)
  8. intToUnsignedByte(int i)
  9. intToUnsignedInt(int data)