ArrayConverters { public static String[] decodeChainList(byte[] currentChainList, int length) { int outputLength = currentChainList.length/length; String[] outArray = new String[outputLength]; for (int i = 0; i < outputLength; i++){ outArray[i] = getChainId(currentChainList, i); } return outArray; }  static String[] decodeChainList(byte[] currentChainList, int length); static float[] convertIntsToFloats(int[] intArray, float floatDivider); static int[] convertByteToIntegers(byte[] byteArray); static int[] convertTwoByteToIntegers(byte[] byteArray); static short[] convertTwoBytesToShorts(byte[] byteArray); static int[] convertFourByteToIntegers(byte[] byteArray); static int[] combineIntegers(int[] twoByteIntArray, int[] fourByteIntArray); static char[] convertIntegerToChar(int[] integerArray); static byte[] convertIntegersToBytes(int[] intArray); static byte[] convertIntegersToTwoBytes(int[] intArray); static byte[] convertShortsToTwoBytes(short[] shortArray); static byte[] convertIntegersToFourByte(int[] intArray); static int[] convertFloatsToInts(float[] floatArray, float floatMultiplier); static List<int[]> splitIntegers(int[] inputArray); static int[] convertCharToIntegers(char[] charArray); static byte[] encodeChainList(String[] chainNames, int length); static int[] recursiveIndexEncode(int[] in); static int[] recursiveIndexDecode(int[] in);  }
@Test public final void testConvertChainList() { byte[] byteArray = {'A','\0','\0','\0', 'A','B','C','\0', 'a','b','c','\0'}; String[] testStringList = {"A","ABC","abc"}; String[] stringList = ArrayConverters.decodeChainList(byteArray,4); assertArrayEquals(testStringList, stringList); }