Convert an array of UIDSets into a array of long UIDs. @param uidset the UIDSets @return arrray of UIDs @since JavaMail 1.5.1
(UIDSet[] uidset)
| 157 | * @since JavaMail 1.5.1 |
| 158 | */ |
| 159 | public static long[] toArray(UIDSet[] uidset) { |
| 160 | //return toArray(uidset, -1); |
| 161 | if (uidset == null) |
| 162 | return null; |
| 163 | long[] uids = new long[(int)UIDSet.size(uidset)]; |
| 164 | int i = 0; |
| 165 | for (UIDSet u : uidset) { |
| 166 | for (long n = u.start; n <= u.end; n++) |
| 167 | uids[i++] = n; |
| 168 | } |
| 169 | return uids; |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Convert an array of UIDSets into a array of long UIDs. |
no test coverage detected