8230531: API Doc for CharsetEncoder.maxBytesPerChar() should be clearer about BOMs
authornaoto
Tue, 24 Sep 2019 08:55:13 -0700
changeset 58297 01f7ba3a4905
parent 58296 7b534a5088d9
child 58298 0152ad7b38b8
8230531: API Doc for CharsetEncoder.maxBytesPerChar() should be clearer about BOMs Reviewed-by: martin, alanb
src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template
--- a/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template	Tue Sep 24 11:39:47 2019 +0800
+++ b/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template	Tue Sep 24 08:55:13 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -455,7 +455,14 @@
     /**
      * 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.
+     * 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]
      *
      * @return  The maximum number of $otype$s that will be produced per
      *          $itype$ of input