Here you can find the source of getIntFromByte(final byte bite)
Parameter | Description |
---|---|
bite | the bite |
public static int getIntFromByte(final byte bite)
//package com.java2s; public class Main { /**/* w w w. ja v a 2 s . c o m*/ * Converts a byte to an int, preserving the sign. * * For example, FF will be converted to 255 and not -1. * * @param bite the bite * @return the int from byte */ public static int getIntFromByte(final byte bite) { return Integer.valueOf(bite & 0xFF); } }