public static void loadDomainEnc(Buffer b, char domains[][]) { for (int n = 0; n < domains.length; n++) { char[] string = new char[b.getUByte()]; for (int k = 0; k < string.length; k++) { string[k] = (char) b.getUByte(); } domains[n] = string; } }
public static void loadTldList(Buffer b) { int length = b.getInt(); tlds = new char[length][]; tldTypes = new int[length]; for (int n = 0; n < length; n++) { tldTypes[n] = b.getUByte(); char[] string = new char[b.getUByte()]; for (int k = 0; k < string.length; k++) { string[k] = (char) b.getUByte(); } tlds[n] = string; } }
public static void loadBadEnc(Buffer b, byte badCombinations[][][], char bads[][]) { for (int n = 0; n < bads.length; n++) { char[] chars = new char[b.getUByte()]; for (int i = 0; i < chars.length; i++) { chars[i] = (char) b.getUByte(); } bads[n] = chars; byte combo[][] = new byte[b.getUByte()][2]; for (byte[] ba : combo) { ba[0] = (byte) b.getUByte(); ba[1] = (byte) b.getUByte(); } if (combo.length > 0) { badCombinations[n] = combo; } } }