CharsetEncoder.maxBytesPerChar()

Ulf Zibis Ulf.Zibis at CoSoCo.de
Tue Sep 24 20:00:21 UTC 2019


Am 21.09.19 um 00:03 schrieb mark.reinhold at oracle.com:
> To avoid this confusion, a more verbose specification might read:
>      * Returns the maximum number of $otype$s that will be produced for each
>      * $itype$ of input.  This value may be used to compute the worst-case size
>      * of the output buffer required for a given input sequence. This value
>      * accounts for any necessary content-independent prefix or suffix
> #if[encoder]
>      * $otype$s, such as byte-order marks.
> #end[encoder]
> #if[decoder]
>      * $otype$s.
> #end[decoder]
>
> (The example of byte-order marks applies only to CharsetEncoders, so
>  I’ve conditionalized that text for Charset-X-Coder.java.template.)

Hi,

wouldn't it be more clear to use "char" or even "{@code char}" instead
"character" as replacment for the $xtype$ parameters?

-Ulf



More information about the core-libs-dev mailing list