Here you can find the source of splitString(String s)
private static List<String> splitString(String s)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { private static List<String> splitString(String s) { if (s.length() < 256) { return Collections.singletonList(s); }/* w ww.ja v a 2 s. co m*/ List<String> list = new ArrayList<>(); int lastPos = 0; for (int i = 0; i < s.length(); i++) { if (i % 255 == 0) { list.add(s.substring(lastPos, i)); lastPos = i + 1; } } return list; } }