On Fri, 19 Feb 2021 01:56:19 GMT, Roger Riggs <rri...@openjdk.org> wrote:
> The formattters are a test component used both standalone and in the context > of the HexPrinter test utilities. > In typical use, the stream is a wrapped byte array, so there are no > exceptions other than EOF. > The choice of DataInputStream was chosen for the convenience of the methods > to read different types > and (declared) exceptions are an unwelcome artifact. > > Formatters are designed to be nested, where one formatter can call another > and the valuable output > is the formatted string that has been accumulated from the beginning of the > stream. > If an exception was percolated up and the formatted output discarded it would > defeat the purpose. > > If an exception was thrown, it would still return useful information about > the stream to that point. > The documentation could be improved to be clear on that point. Got it. Thanks for your clarification. Updated. Thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/2620