Here you can find the source of toInt(byte value)
Parameter | Description |
---|---|
value | the byte value |
public static int toInt(byte value)
//package com.java2s; /* IcosaMapper - an rpg map editor based on equilateral triangles that form an icosahedron * Copyright (C) 2013 Ville Jokela//from w w w.ja va2 s .com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * contact me <ville.jokela@penny-craal.org> */ public class Main { /** * Interpret the byte value as unsigned. * @param value the byte value * @return the value of the byte as an int, as if the byte was unsigned */ public static int toInt(byte value) { return value & 0xFF; } }