Here you can find the source of byteToInteger(final byte b)
Parameter | Description |
---|---|
b | byte to convert. |
public static int byteToInteger(final byte b)
//package com.java2s; //License from project: Apache License public class Main { /** Maximum value of byte. */ private static final int BYTE_MAX = 0xFF; /**/*from w ww . ja v a2s. c o m*/ * Converts byte to integer. * @param b byte to convert. * @return integer value. */ public static int byteToInteger(final byte b) { return (int) b & BYTE_MAX; } }