@@ -77,8 +77,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
7777 * which will call [doFinal] (or [close] if there was an error with
7878 * decoding) for you.
7979 *
80- * @see [newDecoderFeed]
8180 * @see [use]
81+ * @see [newDecoderFeed]
8282 * @see [EncoderDecoder.Feed]
8383 * @see [EncoderDecoder.Feed.doFinal]
8484 * */
@@ -106,8 +106,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
106106 /* *
107107 * Updates the [Decoder.Feed] with a new character to decode.
108108 *
109- * @throws [EncodingException] if [isClosed] is true, or if
110- * there was an error decoding.
109+ * @throws [EncodingException] If [isClosed] is ` true` , or if there was an
110+ * error decoding.
111111 * */
112112 @Throws(EncodingException ::class )
113113 public fun consume (input : Char ) {
@@ -146,12 +146,13 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
146146 }
147147
148148 /* *
149- * Flushes the buffered input and performs any final decoding
150- * operations without closing the [Feed].
149+ * Flushes the buffered input and performs final decoding operations without
150+ * closing the [Feed].
151151 *
152152 * @see [EncoderDecoder.Feed.flush]
153- * @throws [EncodingException] if [isClosed] is true, or if
154- * there was an error decoding.
153+ *
154+ * @throws [EncodingException] If [isClosed] is `true`, or if there was an
155+ * error decoding.
155156 * */
156157 @Throws(EncodingException ::class )
157158 public final override fun flush () {
@@ -224,7 +225,9 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
224225 * @see [CharSequence.decodeBuffered]
225226 * @see [CharSequence.decodeBufferedAsync]
226227 *
227- * @throws [EncodingException] If decoding failed.
228+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
229+ * an invalid character or sequence.
230+ * @throws [EncodingSizeException] If the decoded output would exceed [Int.MAX_VALUE].
228231 * */
229232 @JvmStatic
230233 @Throws(EncodingException ::class )
@@ -263,7 +266,9 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
263266 * @see [CharArray.decodeBuffered]
264267 * @see [CharArray.decodeBufferedAsync]
265268 *
266- * @throws [EncodingException] If decoding failed.
269+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
270+ * an invalid character or sequence.
271+ * @throws [EncodingSizeException] If the decoded output would exceed [Int.MAX_VALUE].
267272 * */
268273 @JvmStatic
269274 @Throws(EncodingException ::class )
@@ -340,7 +345,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
340345 * @see [CharSequence.decodeToByteArrayOrNull]
341346 * @see [CharSequence.decodeBufferedAsync]
342347 *
343- * @throws [EncodingException] If decoding failed.
348+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
349+ * an invalid character or sequence.
344350 * */
345351 @JvmStatic
346352 @Throws(EncodingException ::class )
@@ -400,7 +406,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
400406 * @see [CharSequence.decodeToByteArrayOrNull]
401407 * @see [CharSequence.decodeBufferedAsync]
402408 *
403- * @throws [EncodingException] If decoding failed.
409+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
410+ * an invalid character or sequence.
404411 * @throws [IllegalArgumentException] If [maxBufSize] is less than or equal to
405412 * [EncoderDecoder.Config.maxDecodeEmit].
406413 * */
@@ -477,7 +484,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
477484 * @see [CharSequence.decodeToByteArrayOrNull]
478485 * @see [CharSequence.decodeBufferedAsync]
479486 *
480- * @throws [EncodingException] If decoding failed.
487+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
488+ * an invalid character or sequence.
481489 * @throws [IllegalArgumentException] If [buf] size is less than or equal to
482490 * [EncoderDecoder.Config.maxDecodeEmit].
483491 * */
@@ -545,7 +553,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
545553 * @see [CharSequence.decodeBuffered]
546554 *
547555 * @throws [CancellationException]
548- * @throws [EncodingException] If decoding failed.
556+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
557+ * an invalid character or sequence.
549558 * */
550559 @JvmStatic
551560 @Throws(CancellationException ::class , EncodingException ::class )
@@ -607,7 +616,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
607616 * @see [CharSequence.decodeBuffered]
608617 *
609618 * @throws [CancellationException]
610- * @throws [EncodingException] If decoding failed.
619+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
620+ * an invalid character or sequence.
611621 * @throws [IllegalArgumentException] If [maxBufSize] is less than or equal to
612622 * [EncoderDecoder.Config.maxDecodeEmit].
613623 * */
@@ -686,7 +696,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
686696 * @see [CharSequence.decodeBuffered]
687697 *
688698 * @throws [CancellationException]
689- * @throws [EncodingException] If decoding failed.
699+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
700+ * an invalid character or sequence.
690701 * @throws [IllegalArgumentException] If [buf] size is less than or equal to
691702 * [EncoderDecoder.Config.maxDecodeEmit].
692703 * */
@@ -755,7 +766,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
755766 * @see [CharArray.decodeToByteArrayOrNull]
756767 * @see [CharArray.decodeBufferedAsync]
757768 *
758- * @throws [EncodingException] If decoding failed.
769+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
770+ * an invalid character or sequence.
759771 * */
760772 @JvmStatic
761773 @Throws(EncodingException ::class )
@@ -817,7 +829,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
817829 * @see [CharArray.decodeToByteArrayOrNull]
818830 * @see [CharArray.decodeBufferedAsync]
819831 *
820- * @throws [EncodingException] If decoding failed.
832+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
833+ * an invalid character or sequence.
821834 * @throws [IllegalArgumentException] If [maxBufSize] is less than or equal to
822835 * [EncoderDecoder.Config.maxDecodeEmit].
823836 * */
@@ -898,7 +911,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
898911 * @see [CharArray.decodeToByteArrayOrNull]
899912 * @see [CharArray.decodeBufferedAsync]
900913 *
901- * @throws [EncodingException] If decoding failed.
914+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
915+ * an invalid character or sequence.
902916 * @throws [IllegalArgumentException] If [buf] size is less than or equal to
903917 * [EncoderDecoder.Config.maxDecodeEmit].
904918 * */
@@ -967,7 +981,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
967981 * @see [CharArray.decodeBuffered]
968982 *
969983 * @throws [CancellationException]
970- * @throws [EncodingException] If decoding failed.
984+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
985+ * an invalid character or sequence.
971986 * */
972987 @JvmStatic
973988 @Throws(CancellationException ::class , EncodingException ::class )
@@ -1030,7 +1045,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
10301045 * @see [CharArray.decodeBuffered]
10311046 *
10321047 * @throws [CancellationException]
1033- * @throws [EncodingException] If decoding failed.
1048+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
1049+ * an invalid character or sequence.
10341050 * @throws [IllegalArgumentException] If [maxBufSize] is less than or equal to
10351051 * [EncoderDecoder.Config.maxDecodeEmit].
10361052 * */
@@ -1110,7 +1126,8 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
11101126 * @see [CharArray.decodeBuffered]
11111127 *
11121128 * @throws [CancellationException]
1113- * @throws [EncodingException] If decoding failed.
1129+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
1130+ * an invalid character or sequence.
11141131 * @throws [IllegalArgumentException] If [buf] size is less than or equal to
11151132 * [EncoderDecoder.Config.maxDecodeEmit].
11161133 * */
@@ -1130,6 +1147,9 @@ public sealed class Decoder<C: EncoderDecoder.Config>(public val config: C) {
11301147
11311148 /* *
11321149 * DEPRECATED since `2.3.0`
1150+ * @throws [EncodingException] If decoding failed, such as the [decoder] rejecting
1151+ * an invalid character or sequence.
1152+ * @throws [EncodingSizeException] If the decoded output would exceed [Int.MAX_VALUE].
11331153 * @suppress
11341154 * */
11351155 @JvmStatic
0 commit comments