Here you can find the source of toShort(byte b0, byte b1)
Parameter | Description |
---|---|
b0 | the least significant byte |
b1 | the most significant byte |
public static short toShort(byte b0, byte b1)
//package com.java2s; public class Main { /**//from w ww .ja v a 2 s. c om * Returns a short built from two bytes. * * @param b0 the least significant byte * @param b1 the most significant byte */ public static short toShort(byte b0, byte b1) { return (short) (b0 & 0xFF | b1 << 8); } }