Code example for Splitter

Methods: split

0
    { 
        // hex dump: "616263" 
        String hexDump = base16().lowerCase().encode(bytes);
 
        // hex pairs: ["61", "62", "63"] 
        Iterable<String> hexPairs = HEX_SPLITTER.split(hexDump);
 
        // hex lines: [["61", "62", "63], [...]] 
        Iterable<List<String>> hexLines = partition(hexPairs, bytesPerLine);
 
        // lines: ["61 62 63", ...] 
        Iterable<String> lines = transform(hexLines, joinerFunction(HEX_BYTE_JOINER));
 
        // joined: "61 62 63\n..." 
        return HEX_LINE_JOINER.join(lines);
    } 
 
    private static Function<Iterable<String>, String> joinerFunction(final Joiner joiner)
    { 
        return new Function<Iterable<String>, String>()
Stop searching for code, let great code find you!  Add Codota to your java IDE