Convert byte To Short - Android java.lang

Android examples for java.lang:Byte

Description

Convert byte To Short

Demo Code


//package com.java2s;

public class Main {
    public static short byteToShort(byte[] b, int start) {
        return (short) ((((int) b[start]) << 8) + b[start + 1]);
    }//www  . java 2 s.  c o  m
}

Related Tutorials