Package org.apache.commons.io.function
Interface IOSpliterator<T>
- Type Parameters:
- T- the type of elements returned by this IOSpliterator.
public interface IOSpliterator<T>
Like 
Spliterator but throws IOException.- Since:
- 2.12.0
- 
Method SummaryModifier and TypeMethodDescriptionstatic <E> IOSpliterator<E> adapt(Spliterator<E> iterator) Adapts the given Spliterator as an IOSpliterator.default Spliterator<T> default intdefault longdefault voidforEachRemaining(IOConsumer<? super T> action) default IOComparator<? super T> default longdefault booleanhasCharacteristics(int characteristics) default booleantryAdvance(IOConsumer<? super T> action) default IOSpliterator<T> trySplit()LikeSpliterator.trySplit().unwrap()Unwraps this instance and returns the underlyingSpliterator.
- 
Method Details- 
adaptAdapts the given Spliterator as an IOSpliterator.- Type Parameters:
- E- the type of the stream elements.
- Parameters:
- iterator- The iterator to adapt
- Returns:
- A new IOSpliterator
 
- 
asSpliterator- Returns:
- an UncheckedIOExceptionSpliterator.
 
- 
characteristics- Returns:
- a representation of characteristics
 
- 
estimateSize- Returns:
- the estimated size, or Long.MAX_VALUEif infinite, unknown, or too expensive to compute.
 
- 
forEachRemaining- Parameters:
- action- The action
- Throws:
- NullPointerException- if the specified action is null
 
- 
getComparator- Returns:
- a Comparator, or nullif the elements are sorted in the natural order.
- Throws:
- IllegalStateException- if the spliterator does not report a characteristic of- SORTED.
 
- 
getExactSizeIfKnown- Returns:
- the exact size, if known, else -1.
 
- 
hasCharacteristics- Parameters:
- characteristics- the characteristics to check for
- Returns:
- trueif all the specified characteristics are present, else- false
 
- 
tryAdvance- Parameters:
- action- The action
- Returns:
- falseif no remaining elements existed upon entry to this method, else- true.
- Throws:
- NullPointerException- if the specified action is null
 
- 
trySplitLikeSpliterator.trySplit().- Returns:
- a Spliteratorcovering some portion of the elements, ornullif this spliterator cannot be split
 
- 
unwrapSpliterator<T> unwrap()Unwraps this instance and returns the underlyingSpliterator.Implementations may not have anything to unwrap and that behavior is undefined for now. - Returns:
- the underlying Spliterator.
 
 
-