What is the use case for null(Input/Output)Stream API in Java?
Sometimes you want to have a parameter of InputStream type, but also to be able to choose not to feed your code with any data. In tests it’s probably easier to mock it but in production you may choose to bind null input instead of scattering your code with ifs and flags. compare: class ComposableReprinter … Read more