On Wed, 2 Dec 2020 16:33:15 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> java.util.HexFormat utility: >> >> - Format and parse hexadecimal strings, with parameters for delimiter, >> prefix, suffix and upper/lowercase >> - Static factories and builder methods to create HexFormat copies with >> modified parameters. >> - Consistent naming of methods for conversion of byte arrays to formatted >> strings and back: formatHex and parseHex >> - Consistent naming of methods for conversion of primitive types: >> toHexDigits... and fromHexDigits... >> - Prefix and suffixes now apply to each formatted value, not the string as >> a whole >> - Using java.util.Appendable as a target for buffered conversions so output >> to Writers and PrintStreams >> like System.out are supported in addition to StringBuilder. (IOExceptions >> are converted to unchecked exceptions) >> - Immutable and thread safe, a "value-based" class >> >> See the [HexFormat >> javadoc](http://cr.openjdk.java.net/~rriggs/8251989-hex-formatter/java.base/java/util/HexFormat.html) >> for details. >> >> Review comments and suggestions welcome. > > Roger Riggs has updated the pull request incrementally with one additional > commit since the last revision: > > Add class level clarification of use of uppercase for primitive conversions > Switched order of declaration of a couple of method to make the javadoc > sequence easier to read src/java.base/share/classes/java/util/HexFormat.java line 740: > 738: * @param value an {@code int} value > 739: * @return the eight hexadecimal characters for the {@code int} value > 740: */ I recommend added an @see link to Integer.toHexString (and Long.toHexString for the long overload). ------------- PR: https://git.openjdk.java.net/jdk/pull/482