(byte[] b, int n)
| 889 | */ |
| 890 | // This is visible for testing. |
| 891 | List<int[]> findAllUTF8SubmatchIndex(byte[] b, int n) { |
| 892 | final List<int[]> result = new ArrayList<int[]>(); |
| 893 | allMatches( |
| 894 | MachineInput.fromUTF8(b), |
| 895 | n, |
| 896 | new DeliverFunc() { |
| 897 | @Override |
| 898 | public void deliver(int[] match) { |
| 899 | result.add(match); |
| 900 | } |
| 901 | }); |
| 902 | if (result.isEmpty()) { |
| 903 | return null; |
| 904 | } |
| 905 | return result; |
| 906 | } |
| 907 | |
| 908 | /** |
| 909 | * {@code findAllSubmatch} is the <a href='#all'>All</a> version of {@link #findSubmatch}; it |