@Test public void testSetChain() { String[] stringList = {"A","ABC","abc","abcd"}; byte[] testByteArray = {'A','\0','\0','\0', 'A','B','C','\0', 'a','b','c','\0', 'a','b','c','d'}; byte[] byteArray = ArrayConverters.encodeChainList(stringList,4); assertArrayEquals(testByteArray, byteArray); }
public static byte[] encodeChainList(String[] chainNames, int length) { byte[] outArr = new byte[chainNames.length*length]; for(int i=0; i<chainNames.length;i++) { setChainId(chainNames[i], outArr, i); } return outArr; }
ArrayConverters { public static byte[] encodeChainList(String[] chainNames, int length) { byte[] outArr = new byte[chainNames.length*length]; for(int i=0; i<chainNames.length;i++) { setChainId(chainNames[i], outArr, i); } return outArr; } }
ArrayConverters { public static byte[] encodeChainList(String[] chainNames, int length) { byte[] outArr = new byte[chainNames.length*length]; for(int i=0; i<chainNames.length;i++) { setChainId(chainNames[i], outArr, i); } return outArr; }  }
ArrayConverters { public static byte[] encodeChainList(String[] chainNames, int length) { byte[] outArr = new byte[chainNames.length*length]; for(int i=0; i<chainNames.length;i++) { setChainId(chainNames[i], outArr, i); } return outArr; }  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); }
ArrayConverters { public static byte[] encodeChainList(String[] chainNames, int length) { byte[] outArr = new byte[chainNames.length*length]; for(int i=0; i<chainNames.length;i++) { setChainId(chainNames[i], outArr, i); } return outArr; }  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);  }