Iterable<Object[]> () { return Arrays.asList(new Object[][]{ { // case number 0 "str1\nstr2\n", StandardCharsets.UTF_8, false, 5, 4, new String[]{ "str1\n", "str2\n"} }, { // case number 1 "str1\nstr2\n", StandardCharsets.UTF_8, false, 3, 0, new String[]{ "str", "1\ns", "tr2", "\n"} }, { // case number 2 "str1\nstr2\n", StandardCharsets.UTF_8, false, 10, 0, new String[]{ "str1\nstr2\n"} }, { // case number 3 "str1\nstr2\n", StandardCharsets.UTF_8, false, 9, 4, new String[]{ "str1\nstr2\n", ""} }, { // case number 4 "ыыы1\nstr2\n", StandardCharsets.UTF_8, false, 3, 0, new String[]{ "ыы", "ы", "1\ns", "tr2", "\n"} }, { // case number 5 "ыыы1\nstr2\n", StandardCharsets.UTF_8, false, 3, 0, new String[]{ "ыы", "ы", "1\ns", "tr2", "\n"} }, { // case number 6 "str1\nstr2\n", CharsetToolkit.UTF_32BE_CHARSET, false, 16, 0, new String[]{ "str1", "\nstr", "2\n"} }, { // case number 7 "str1\nstr2\n", CharsetToolkit.UTF_32BE_CHARSET, true, 16, 0, new String[]{ "str", "1\nst", "r2\n"} }, { // case number 8 "ыыы1\nstr2\n", CharsetToolkit.UTF_32LE_CHARSET, true, 16, 0, new String[]{ "ыыы", "1\nst", "r2\n"} }, { // case number 9 "ыыы1\nstr2\n", StandardCharsets.UTF_16LE, false, 8, 0, new String[]{ "ыыы1", "\nstr", "2\n"} }, { // case number 10 "ыыы1\nstr2\n", StandardCharsets.UTF_16BE, false, 8, 0, new String[]{ "ыыы1", "\nstr", "2\n"} }, { // case number 11 "\uD840\uDC00" + "\uD840\uDC00" + "\uD840\uDC00", StandardCharsets.UTF_16BE, false, 5, 0, new String[]{ "\uD840\uDC00" + "\uD840\uDC00", "\uD840\uDC00", ""} }, { // case number 12 "\uD840\uDC00" + "\uD840\uDC00" + "\uD840\uDC00", StandardCharsets.UTF_16BE, false, 6, 0, new String[]{ "\uD840\uDC00" + "\uD840\uDC00", "\uD840\uDC00"} }, { // case number 13 "\uD840\uDC00" + "\uD840\uDC00" + "\uD840\uDC00", StandardCharsets.UTF_16BE, false, 7, 0, new String[]{ "\uD840\uDC00" + "\uD840\uDC00", "\uD840\uDC00"} }, { // case number 14 """ \uD840\uDC00\uD840\uDC00\uD840\uDC001 str2 """, StandardCharsets.UTF_16BE, false, 8, 0, new String[]{ "\uD840\uDC00" + "\uD840\uDC00", "\uD840\uDC00" + "1\n", "str2", "\n"} }, { // case number 15 "\uD840\uDC00" + "\uD840\uDC00" + "\uD840\uDC00", StandardCharsets.UTF_16BE, false, 2, 0, new String[]{ "\uD840\uDC00", "", "\uD840\uDC00", "", "\uD840\uDC00", ""} }, { // case number 16 "\uD840\uDC00" + "\uD840\uDC00" + "\uD840\uDC00", StandardCharsets.UTF_16LE, false, 5, 0, new String[]{ "\uD840\uDC00" + "\uD840\uDC00", "\uD840\uDC00", ""} }, { // case number 17 "\uD840\uDC00" + "\uD840\uDC00" + "\uD840\uDC00", StandardCharsets.UTF_16LE, false, 6, 0, new String[]{ "\uD840\uDC00" + "\uD840\uDC00", "\uD840\uDC00"} }, { // case number 18 "\uD840\uDC00" + "\uD840\uDC00" + "\uD840\uDC00", StandardCharsets.UTF_16LE, false, 7, 0, new String[]{ "\uD840\uDC00" + "\uD840\uDC00", "\uD840\uDC00"} }, { // case number 19 """ \uD840\uDC00\uD840\uDC00\uD840\uDC001 str2 """, StandardCharsets.UTF_16LE, false, 8, 0, new String[]{ "\uD840\uDC00" + "\uD840\uDC00", "\uD840\uDC00" + "1\n", "str2", "\n"} }, { // case number 20 "ыыы1\nstr2\n", StandardCharsets.UTF_16BE, false, 8, 0, new String[]{ "ыыы1", "\nstr", "2\n"} }, { // case number 21 "ыыы1\nstr2\n", StandardCharsets.UTF_16BE, false, 8, 6, new String[]{ "ыыы1\n", "str2\n", ""} }, { // case number 22 "ыыы1\rstr2\r", StandardCharsets.UTF_16BE, false, 8, 6, new String[]{ "ыыы1\r", "str2\r", ""} }, { // case number 23 "ыыы1\r\nstr2\r\n", StandardCharsets.UTF_16BE, false, 8, 6, new String[]{ "ыыы1\r\n", "str2\r", "\n"} }, }); }