VistaStringUtils { public static String crc16Hex(String s) { return Integer.toHexString((int) crc16(s)).toUpperCase(); }  static String piece(String s); static String piece(String s, int piece1); static String piece(String s, int piece1, int piece2); static String piece(String s, String delimiter); static String piece(String s, String delimiter, int piece1); static String piece(String s, String delimiter, int piece1, int piece2); static String translate(String s, String identifier, String associator); static long crc16(String s); static String crc16Hex(String s); static Object splitLargeStringIfNecessary(String s); static Object splitLargeStringIfNecessary(String s, int length); static String nameCase(String s); static final String U; }
@Test public void testCrc16Hex() { assertEquals("30C0", VistaStringUtils.crc16Hex("A")); assertEquals("4521", VistaStringUtils.crc16Hex("ABC")); assertEquals("9F06", VistaStringUtils.crc16Hex("serverserverserv1.DOMAIN.EXT")); }