Here you can find the source of unsignedByteToLong(final byte b)
Parameter | Description |
---|---|
b | a parameter |
public static long unsignedByteToLong(final byte b)
//package com.java2s; /******************************************************************************* * Copyright (c) 2011 www.isandlatech.com (www.isandlatech.com) * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors://ww w . j ava 2 s .c om * ogattaz (isandlaTech) - initial API and implementation *******************************************************************************/ public class Main { /** * @param b * @return */ public static long unsignedByteToLong(final byte b) { return (b & 128) + (b & 127); } }