Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-12-01 Thread Daniel Fuchs
On Fri, 27 Nov 2020 17:01:35 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/util/HexFormat.java line 528: >> >>> 526: * a range of the character array. >>> 527: * >>> 528: * Each byte value is parsed as the prefix, two case insensitive >>> hexadecimal characters, >>

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-30 Thread Naoto Sato
Hi Roger, Thanks for your thought and I agree with you. Since this is a utility primarily meant for developers, not end users, limiting the "hexadecimal string/character" in Latin-1 seems reasonable. Naoto On 11/30/20 7:42 AM, Roger Riggs wrote: Hi Naoto, There are a couple of ways

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-30 Thread Roger Riggs
Hi Naoto, There are a couple of ways consistency can be achieved (and with what). The existing hex conversions from strings to hex all delegate to Character.digit(ch, radix) which allows both digits and letters beyond Latin1. (See Integer.valueOf(string, radix), Long.valueOf(string, radix),

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Naoto Sato
On Fri, 27 Nov 2020 16:57:07 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/util/HexFormat.java line 853: >> >>> 851: */ >>> 852: public int fromHexDigit(int ch) { >>> 853: int value = Character.digit(ch, 16); >> >> Do we need to limit parsing the hex digit for

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 16:56:37 GMT, Chris Hegarty wrote: >> It is the byte array that is formatted, the result is a hexadecimal string. >> It helps make a stronger distinction between the byte array functions and >> the primitive functions. > >> It is the byte array that is formatted, the result

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Wed, 25 Nov 2020 23:36:22 GMT, Naoto Sato wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 10:46:09 GMT, Chris Hegarty wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 09:54:07 GMT, Chris Hegarty wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Chris Hegarty
On Fri, 27 Nov 2020 16:51:02 GMT, Roger Riggs wrote: > It is the byte array that is formatted, the result is a hexadecimal string. I don't understand. How is the byte array formatter? Do we have "formatted byte arrays" and "unformatted byte arrays"? Are they formatted somehow with prefix,

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 09:40:10 GMT, Chris Hegarty wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Thu, 26 Nov 2020 00:08:37 GMT, Naoto Sato wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
On Fri, 27 Nov 2020 09:33:26 GMT, Chris Hegarty wrote: >> Roger Riggs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 19 additional >> commits

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Chris Hegarty
On Wed, 25 Nov 2020 22:51:44 GMT, Roger Riggs 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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Chris Hegarty
On Wed, 25 Nov 2020 22:51:44 GMT, Roger Riggs 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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-25 Thread Naoto Sato
On Wed, 25 Nov 2020 22:51:44 GMT, Roger Riggs 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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-25 Thread Roger Riggs
> 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