| Package | Description |
|---|---|
| java.io |
Provides for system input and output through data streams, serialization and the file system.
|
| java.nio.file |
Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.
|
| java.util |
Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).
|
| java.util.jar |
Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file.
|
| java.util.regex |
Classes for matching character sequences against patterns specified by regular expressions.
|
| java.util.stream |
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.
|
| java.util.zip |
Provides classes for reading and writing the standard ZIP and GZIP file formats.
|
| Modifier and Type | Method and Description |
|---|---|
Stream |
BufferedReader.lines()
Returns a
Stream, the elements of which are lines read from this
BufferedReader.
|
| Modifier and Type | Method and Description |
|---|---|
static Stream |
Files.find(Path
Return a
Stream that is lazily populated with
Path by searching for files in a file tree rooted at a given starting file.
|
static Stream |
Files.lines(Path
Read all lines from a file as a
Stream.
|
static Stream |
Files.lines(Path
Read all lines from a file as a
Stream.
|
static Stream |
Files.list(Path
Return a lazily populated
Stream, the elements of which are the entries in the directory.
|
static Stream |
Files.walk(Path
Return a
Stream that is lazily populated with
Path by walking the file tree rooted at a given starting file.
|
static Stream |
Files.walk(Path
Return a
Stream that is lazily populated with
Path by walking the file tree rooted at a given starting file.
|
| Modifier and Type | Method and Description |
|---|---|
default Stream |
Collection.parallelStream()
Returns a possibly parallel
Stream with this collection as its source.
|
default Stream |
Collection.stream()
Returns a sequential
Stream with this collection as its source.
|
static <T> Stream |
Arrays.stream(T[] array)
Returns a sequential
Stream with the specified array as its source.
|
static <T> Stream |
Arrays.stream(T[] array, int startInclusive, int endExclusive)
Returns a sequential
Stream with the specified range of the specified array as its source.
|
| Modifier and Type | Method and Description |
|---|---|
Stream |
JarFile.stream()
|
| Modifier and Type | Method and Description |
|---|---|
Stream |
Pattern.splitAsStream(CharSequence
Creates a stream from the given input sequence around matches of this pattern.
|
| Modifier and Type | Method and Description |
|---|---|
Stream |
IntStream.boxed()
Returns a
Stream consisting of the elements of this stream, each boxed to an
Integer.
|
Stream |
DoubleStream.boxed()
Returns a
Stream consisting of the elements of this stream, boxed to
Double.
|
Stream |
LongStream.boxed()
Returns a
Stream consisting of the elements of this stream, each boxed to a
Long.
|
Stream |
Stream.Builder.build()
Builds the stream, transitioning this builder to the built state.
|
static <T> Stream |
Stream.concat(Stream
Creates a lazily concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream.
|
Stream |
Stream.distinct()
Returns a stream consisting of the distinct elements (according to
Object) of this stream.
|
static <T> Stream |
Stream.empty()
Returns an empty sequential
Stream.
|
Stream |
Stream.filter(Predicate
Returns a stream consisting of the elements of this stream that match the given predicate.
|
<R> Stream |
Stream.flatMap(Function
Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.
|
static <T> Stream |
Stream.generate(Supplier
Returns an infinite sequential unordered stream where each element is generated by the provided
Supplier.
|
static <T> Stream |
Stream.iterate(T seed, UnaryOperator
Returns an infinite sequential ordered
Stream produced by iterative application of a function
f to an initial element
seed, producing a
Stream consisting of
seed,
f(seed),
f(f(seed)), etc.
|
Stream |
Stream.limit(long maxSize)
Returns a stream consisting of the elements of this stream, truncated to be no longer than
maxSize in length.
|
<R> Stream |
Stream.map(Function
Returns a stream consisting of the results of applying the given function to the elements of this stream.
|
<U> Stream |
DoubleStream.mapToObj(DoubleFunction
Returns an object-valued
Stream consisting of the results of applying the given function to the elements of this stream.
|
<U> Stream |
IntStream.mapToObj(IntFunction
Returns an object-valued
Stream consisting of the results of applying the given function to the elements of this stream.
|
<U> Stream |
LongStream.mapToObj(LongFunction
Returns an object-valued
Stream consisting of the results of applying the given function to the elements of this stream.
|
static <T> Stream |
Stream.of(T... values)
Returns a sequential ordered stream whose elements are the specified values.
|
static <T> Stream |
Stream.of(T t)
Returns a sequential
Stream containing a single element.
|
Stream |
Stream.peek(Consumer
Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as elements are consumed from the resulting stream.
|
Stream |
Stream.skip(long n)
Returns a stream consisting of the remaining elements of this stream after discarding the first
n elements of the stream.
|
Stream |
Stream.sorted()
Returns a stream consisting of the elements of this stream, sorted according to natural order.
|
Stream |
Stream.sorted(Comparator
Returns a stream consisting of the elements of this stream, sorted according to the provided
Comparator.
|
static <T> Stream |
StreamSupport.stream(Spliterator
Creates a new sequential or parallel
Stream from a
Spliterator.
|
static <T> Stream |
StreamSupport.stream(Supplier
Creates a new sequential or parallel
Stream from a
Supplier of
Spliterator.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Stream |
Stream.concat(Stream
Creates a lazily concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream.
|
static <T> Stream |
Stream.concat(Stream
Creates a lazily concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream.
|
| Modifier and Type | Method and Description |
|---|---|
<R> Stream |
Stream.flatMap(Function
Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.
|
| Modifier and Type | Method and Description |
|---|---|
Stream |
ZipFile.stream()
Return an ordered
Stream over the ZIP file entries.
|