4842457: (bf spec) Clarify meaning of "(optional operation)"

Reviewed-by: alanb
This commit is contained in:
Brian Burkhalter 2023-03-23 18:00:07 +00:00
parent 6fa25cc134
commit 46cca1a4c5

View file

@ -258,6 +258,15 @@ import jdk.internal.util.ArraysSupport;
* cb.put("text/").put(subtype).put("; charset=").put(enc);</pre></blockquote>
*
#end[char]
* <h2> Optional operations </h2>
* Methods specified as
* <i>{@linkplain Buffer##read-only-buffers-heading optional
* operations}</i> throw a {@linkplain ReadOnlyBufferException} when invoked
* on a {@linkplain java.nio.Buffer#isReadOnly read-only} $Type$Buffer. The
* methods {@linkplain #array array} and {@linkplain #arrayOffset arrayOffset}
* throw an {@linkplain UnsupportedOperationException} if the $Type$Buffer is
* not backed by an {@linkplain Buffer#hasArray accessible $type$ array}
* (irrespective of whether the $Type$Buffer is read-only).
*
*
* @author Mark Reinhold