Here you can find the source of byteToInt(int b)
Parameter | Description |
---|---|
b | Input byte value |
public static int byteToInt(int b)
//package com.java2s; //License from project: Open Source License public class Main { /**//ww w.ja v a 2s . c o m * Byte to Int converter * * @param b Input byte value * @return Int value */ public static int byteToInt(int b) { int i = b; if (i < 0) { i = i + 256; } return i; } }