transforms the given array of longs to an array of byte-arrays

@param l
the longs to transform
@return the to l corresponding array of byte-arrays
970170
public static byte[][] toByteArray(long[] l) {
        byte[][] b = new byte[l.length][];
        for (int i = 0; i < b.length; i++) {
            b[i] = Bytes.toBytes(l[i]);
        }
        return b;
    }
872353
public static byte[] longToBytes(long val) {
    byte[] b = new byte[8];
    for (int i = 7; i > 0; i--) {
      b[i] = (byte) val;
      val >>>= 8;
    }
    b[0] = (byte) val;
    return b;
  }
464505
public static long[] toLongArray(Collection<Long> collection) {
        long[] collectionArray = new long[collection.size()];
        int index = 0;
        for (Long item : collection) {
            collectionArray[index++] = item;
        }
        return collectionArray;
    }
315203
public static long[] convertToArrayLongs(final Block[] blockArray) {
    long[] blocksAsLongs = new long[blockArray.length * LONGS_PER_BLOCK];

    BlockListAsLongs bl = new BlockListAsLongs(blocksAsLongs);
    assert bl.getNumberOfBlocks() == blockArray.length;

    for (int i = 0; i < blockArray.length; i++) {
      bl.setBlock(i, blockArray[i]);
    }
    return blocksAsLongs;
  }
461826
public static ULong[] ulong_a(long... values) {
        ULong[] array = new ULong[values.length];
        for (int i = 0; i < values.length; i++) {
            array[i] = ulong(values[i]);
        }
        return array;
    }
633089
public Packet putLong(long l, ByteOrder order) {
        var buffer = HEAP_BUFFER_POOL.take(Long.BYTES);
        var array = buffer.putLong(order == ByteOrder.LITTLE_ENDIAN ? Long.reverseBytes(l) : l).array();
        
        try {
            return enqueue(Arrays.copyOfRange(array, 0, Long.BYTES));
        } finally {
            HEAP_BUFFER_POOL.give(buffer);
        }
    }
898662
@Override
	public long[] toArrayLong() {
		long[] result = new long[size];
		System.arraycopy(elementData, 0, result, 0, size);
		return result;
	}
39532
public static long byteArrayToLongLE( byte[] data ) {
        if (data == null)
            return 0x0;
        long accum = 0;
        int shiftBy = 0;
        for( byte b : data ) {
            accum |= (long) (b & 0xff) << shiftBy;
            shiftBy += 8;
        }
        return accum;
    }
735572
public static Object toPrimitiveLongArray(List<?> values)
    {
        long[] array = new long[values.size()];
        int cursor = 0;
        
        for(Object o : values)
        {
            array[cursor] = (Long) o;
            cursor ++;
        }
        return array;
    }
26081
public static long[] longArrayWrappedOrCopy(CollectionNumber coll) {
        long[] array = wrappedLongArray(coll);
        if (array != null) {
            return array;
        }
        return longArrayCopyOf(coll);
    }
1267081
public static Long[] transformToLong(final String[] ids) {
    if (null == ids) return new Long[0];
    Long[] idsOfLong = new Long[ids.length];
    for (int i = 0; i < ids.length; i++) {
      idsOfLong[i] = new Long(ids[i]);
    }
    return idsOfLong;
  }
724703
public static long toLong(byte[] b) {
        return ((((long) b[7]) & 0xFF)
                + ((((long) b[6]) & 0xFF) << 8)
                + ((((long) b[5]) & 0xFF) << 16)
                + ((((long) b[4]) & 0xFF) << 24)
                + ((((long) b[3]) & 0xFF) << 32)
                + ((((long) b[2]) & 0xFF) << 40)
                + ((((long) b[1]) & 0xFF) << 48)
                + ((((long) b[0]) & 0xFF) << 56));
    }
381094
public static long[] unWrap(Long... values) {
		if (null == values) {
			return null;
		}
		final int length = values.length;
		if (0 == length) {
			return new long[0];
		}

		final long[] array = new long[length];
		for (int i = 0; i < length; i++) {
			array[i] = values[i].longValue();
		}
		return array;
	}
1092102
public static final long getLong(byte[] data, int offset)
   {
      if (data.length != 8)
      {
         throw new UnexpectedStructureException();
      }

      long result = 0;
      int i = offset;
      for (int shiftBy = 0; shiftBy < 64; shiftBy += 8)
      {
         result |= ((long) (data[i] & 0xff)) << shiftBy;
         ++i;
      }
      return result;
   }
1360984
public static byte[] longToDWord(long a) {
    	byte[] ret = new byte[4];
        ret[0] = (byte) (a & 0xFF);   
        ret[1] = (byte) ((a >> 8) & 0xFF);   
        ret[2] = (byte) ((a >> 16) & 0xFF);   
        ret[3] = (byte) ((a >> 24) & 0xFF);
        return ret;
    }
855427
public static long[] toLongArray(String pString, String pDelimiters) {
        if (isEmpty(pString)) {
            return new long[0];
        }

        // Some room for improvement here...
        String[] temp = toStringArray(pString, pDelimiters);
        long[] array = new long[temp.length];

        for (int i = 0; i < array.length; i++) {
            array[i] = Long.parseLong(temp[i]);
        }
        return array;
    }
429350
public synchronized List<ACL> convertLong(Long longVal) {
        if (longVal == null)
            return null;
        if (longVal == -1L)
            return Ids.OPEN_ACL_UNSAFE;
        List<ACL> acls = longKeyMap.get(longVal);
        if (acls == null) {
            LOG.error("ERROR: ACL not available for long " + longVal);
            throw new RuntimeException("Failed to fetch acls for " + longVal);
        }
        return acls;
    }