Java Byte Array Little Endian bytesLittleToShort(byte[] data, int start)

Here you can find the source of bytesLittleToShort(byte[] data, int start)

Description

bytes Little To Short

License

Apache License

Declaration

public static short bytesLittleToShort(byte[] data, int start) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static short bytesLittleToShort(byte[] data, int start) {
        short ret = 0;
        ret = (short) (data[start + 0] & 0x00ff);
        ret |= (0x00ff & data[start + 1]) << 8;
        return ret;
    }//from w ww  .  j  a  va2 s . c o  m
}

Related

  1. bytesLE2ushorts(byte[] b)
  2. BytesLEToFloat(final byte[] value)
  3. BytesLEToShort(final byte[] buf)
  4. bytesLittleToFloat(byte[] data, int start)
  5. bytesLittleToLong(byte[] data, int start)