So, if I have it correct, the functionality is: break the String up on spaces, such that each piece is as long as possible, but no longer than maxBreak.
Your question is if your code can be expressed using java8 Streams. Well, I did an attempt, starting from my own logic, but it is not so easy. There are probably handier ways, and I leave it up to you to judge whether this is useless or not. Still, it makes for some nice exercise in streams! So, if you like, see if you can translate your own logic into code that employs some Streams.
My approach is:
1) determine the indices of all the spaces. For technical reasons I add an extra space at the end of the String, unless it already ends with a space.
2) check whether there are no two consecutive indices that differ more than maxBreak
3) now, apply this algorithm: if say the indices are 4, 7, 9, 12, 15, 20, 24, ... and maxBreak is 10, then the breaks will be 9, 15, 24, ...
A problem when using Streams that need some history, is that you cannot use an ordinary variable to store that history, since then you get the error that such a variable needs to be final or effectively final. The quick and dirty solution that I use is to use an array of size 1, and store some history in array. That is okay, since the content may not be final, the array itself is.