code: static byte[] numberToBytes(String number, int length, boolean bigEndian) {
  		BigInteger bi = new BigInteger(number);
  		byte[] bytes = bi.toByteArray();
  		int remaining = length - bytes.length;
  		if (remaining < 0) {
  			bytes = Arrays.copyOfRange(bytes, -remaining, bytes.length);
  		} else {
  			byte[] fill = new byte[remaining];
  			bytes = addAll(fill, bytes);
  		}
  		if (!bigEndian) {
  			reverse(bytes);
  		}
  		return bytes;
  	}
docs: Converts the given number to a binary representation of the specified
  length and "endian-ness".
  
  @param number String with number to convert
  @param length How long the resulting binary array should be
  @param bigEndian <code>true</code> if big endian (5=0005), or
  <code>false</code> if little endian (5=5000)
  @return byte array containing the binary result in the given order