Google/IntelliJ and Jakarta
We just had a need to push an input stream into a byte array.
I told the guy who was about to write the code to pause because people must have done this before.
A bit of a googling showed that StreamUtil was a common Utility class name(yeah, yeah util is a code smell). On a whim I went into IntelliJ and used the magic of <ctrl> <alt> space to check out if there were any Stream Utilish classes around (we have a number of jars in our tree due to dependencies etc)…. and found a copy of StreamUtil from here.
After going with IOUtil because that is the suggested way forward, we have a byte array from the stream with one line of code.
Nice.