Android Byte Array to String Convert byteArrayToShort(byte[] value, int offset)

Here you can find the source of byteArrayToShort(byte[] value, int offset)

Description

byte Array To Short

Declaration

public static final short byteArrayToShort(byte[] value, int offset) 

Method Source Code

//package com.java2s;

public class Main {
    public static final short byteArrayToShort(byte[] value, int offset) {
        return (short) ((((short) value[0 + offset] << 8) & 0xFF00) | ((short) value[1 + offset] & 0x00FF));
    }//from w ww. j  a  va  2 s. c o m
}

Related

  1. printBytes(byte[] data, String type)
  2. bytesToByteString(byte[] bytes)
  3. toText(byte[] arr)
  4. byteArray(StringBuilder buffer, byte[] bytes)
  5. byteArrayToInt(byte[] value, int offset)
  6. byteArrayToString(byte[] data)
  7. byteArrayToString(byte[] data)
  8. writeByteArray(byte[] bytes)