Java Byte to Unsigned Int asUnsignedShort(short s)

Here you can find the source of asUnsignedShort(short s)

Description

as Unsigned Short

License

Open Source License

Declaration

public static int asUnsignedShort(short s) 

Method Source Code

//package com.java2s;
/*//from w  w  w . j  av  a  2  s .  c  om
 * Copyright (c) 2014 Contextream, Inc. and others.  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
 */

public class Main {
    public static int asUnsignedShort(short s) {
        return s & 0xFFFF;
    }
}

Related

  1. asUnsignedByte(int n)
  2. asUnsignedInt(byte b)
  3. asUnsignedInt(byte signedValue)
  4. asUnsignedLong(byte signedValue)
  5. asUnsignedShort(byte signedValue)
  6. byteToUByte(byte value)
  7. byteToUInt(byte b)
  8. byteToul(byte b)
  9. byteToUnInt(Byte sByte)