MCPcopy
hub / github.com/OpenTSDB/opentsdb / concatByteArrays

Method concatByteArrays

test/storage/MockBase.java:911–923  ·  view source on GitHub ↗

Concatenates byte arrays into one big array @param arrays Any number of arrays to concatenate @return The concatenated array

(final byte[]... arrays)

Source from the content-addressed store, hash-verified

909 * @return The concatenated array
910 */
911 public static byte[] concatByteArrays(final byte[]... arrays) {
912 int len = 0;
913 for (final byte[] array : arrays) {
914 len += array.length;
915 }
916 final byte[] result = new byte[len];
917 len = 0;
918 for (final byte[] array : arrays) {
919 System.arraycopy(array, 0, result, len, array.length);
920 len += array.length;
921 }
922 return result;
923 }
924
925 /** Creates the TSDB and UID tables */
926 private void setupDefaultTables() {

Calls

no outgoing calls

Tested by

no test coverage detected