Here you can find the source of unsignedShortToInt(short n)
Parameter | Description |
---|---|
n | the unsigned short. |
public static int unsignedShortToInt(short n)
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 Ericsson/* w w w.ja v a 2s . c o m*/ * * 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: * Vincent Perot - Initial API and implementation *******************************************************************************/ public class Main { /** * Generate an integer from an unsigned short. * * @param n * the unsigned short. * @return the integer representing the unsigned value. */ public static int unsignedShortToInt(short n) { return n & 0x0000FFFF; } }