code: public static void setShort(int n, byte[] b, int off, boolean littleEndian) {
  		if (littleEndian) {
  			b[off] = (byte) n;
  			b[off + 1] = (byte) (n >>> 8);
  		} else {
  			b[off] = (byte) (n >>> 8);
  			b[off + 1] = (byte) n;
  		}
  	}
docs: Store a <b>short</b> number into a byte array in a given byte order