Android Byte Array Convert From shortToByteArray(short value)

Here you can find the source of shortToByteArray(short value)

Description

short To Byte Array

Declaration

public static final byte[] shortToByteArray(short value) 

Method Source Code

//package com.java2s;

public class Main {
    public static final byte[] shortToByteArray(short value) {
        return new byte[] { (byte) (value >>> 8), (byte) value };
    }/*from  w w w. ja  v  a 2s  . c  o m*/
}

Related

  1. toByteArray(long[] array)
  2. toByteArray(short val, byte[] b, int pos)
  3. toByteArray(short[] array)
  4. toByteArrayFromByteWrapperArray(Byte[] B)
  5. convertIntArrayToByteArray(int[] intArray)
  6. convertLongArrayToByteArray(long[] longArray)
  7. toByte(String value, byte defaultValue)
  8. toByte(int byteValue)
  9. toByte(int n)