BlockFileLoader: stream() call streamBuffers()

`stream()` is `streamBuffers()` with a `map()` operation to
read a buffer into a Block. Make this more clear by removing
duplicated code.
This commit is contained in:
Sean Gilligan 2023-10-04 18:19:54 -07:00 committed by Andreas Schildbach
parent 712d8aac10
commit d347ef996e

View file

@ -204,8 +204,7 @@ public class BlockFileLoader implements Iterable<Block> {
}
public Stream<Block> stream() {
return files.stream()
.flatMap(this::fileBlockStream)
return streamBuffers()
.map(serializer::makeBlock);
}