code: public <T extends Collection<Val>> T nextCollection(@NonNull Supplier<T> supplier) throws IOException {
        return nextCollection(supplier, StringUtils.EMPTY);
     }
docs: Reads the next array as a collection.
  
  @param <T>      the collection type
  @param supplier the supplier to create a new collection
  @return the collection containing the items in the next array
  @throws IOException Something went wrong reading