7272 * an instance.
7373 * <p>
7474 * This class provides following primitive methods to write MessagePack values. These primitive methods write
75- * short bytes (1 to 7 bytes) to the internal buffer at once. There are also some complex methods for convenience.
75+ * short bytes (1 to 7 bytes) to the internal buffer at once. There are also some utility methods for convenience.
7676 * <p>
7777 * Primitive methods:
7878 *
9595 * </table>
9696 *
9797 * <p>
98- * Complex methods:
98+ * Utility methods:
9999 *
100100 * <table>
101101 * <tr><th>Java type</th><th>Packer method</th><th>MessagePack type</th></tr>
@@ -173,7 +173,7 @@ protected MessagePacker(MessageBufferOutput out, MessagePack.PackerConfig config
173173 }
174174
175175 /**
176- * Replaces underlaying output.
176+ * Replaces underlying output.
177177 * <p>
178178 * This method flushes current internal buffer to the output, swaps it with the new given output, then returns
179179 * the old output.
@@ -183,7 +183,7 @@ protected MessagePacker(MessageBufferOutput out, MessagePack.PackerConfig config
183183 *
184184 * @param out new output
185185 * @return the old output
186- * @throws IOException when underlaying output throws IOException
186+ * @throws IOException when underlying output throws IOException
187187 * @throws NullPointerException the given output is null
188188 */
189189 public MessageBufferOutput reset (MessageBufferOutput out )
@@ -206,7 +206,7 @@ public MessageBufferOutput reset(MessageBufferOutput out)
206206 /**
207207 * Returns total number of written bytes.
208208 * <p>
209- * This method returns total of amount of data flushed to the underlaying output plus size of current
209+ * This method returns total of amount of data flushed to the underlying output plus size of current
210210 * internal buffer.
211211 *
212212 * <p>
@@ -218,9 +218,9 @@ public long getTotalWrittenBytes()
218218 }
219219
220220 /**
221- * Flushes internal buffer to the underlaying output.
221+ * Flushes internal buffer to the underlying output.
222222 * <p>
223- * This method also calls flush method of the underlaying output after writing internal buffer.
223+ * This method also calls flush method of the underlying output after writing internal buffer.
224224 */
225225 @ Override
226226 public void flush ()
@@ -233,7 +233,7 @@ public void flush()
233233 }
234234
235235 /**
236- * Closes underlaying output.
236+ * Closes underlying output.
237237 * <p>
238238 * This method flushes internal buffer before closing.
239239 */
@@ -360,7 +360,7 @@ private void writeLong(long v)
360360 * This method writes a nil byte.
361361 *
362362 * @return this
363- * @throws IOException when underlaying output throws IOException
363+ * @throws IOException when underlying output throws IOException
364364 */
365365 public MessagePacker packNil ()
366366 throws IOException
@@ -375,7 +375,7 @@ public MessagePacker packNil()
375375 * This method writes a true byte or a false byte.
376376 *
377377 * @return this
378- * @throws IOException when underlaying output throws IOException
378+ * @throws IOException when underlying output throws IOException
379379 */
380380 public MessagePacker packBoolean (boolean b )
381381 throws IOException
@@ -392,7 +392,7 @@ public MessagePacker packBoolean(boolean b)
392392 *
393393 * @param b the integer to be written
394394 * @return this
395- * @throws IOException when underlaying output throws IOException
395+ * @throws IOException when underlying output throws IOException
396396 */
397397 public MessagePacker packByte (byte b )
398398 throws IOException
@@ -414,7 +414,7 @@ public MessagePacker packByte(byte b)
414414 *
415415 * @param v the integer to be written
416416 * @return this
417- * @throws IOException when underlaying output throws IOException
417+ * @throws IOException when underlying output throws IOException
418418 */
419419 public MessagePacker packShort (short v )
420420 throws IOException
@@ -449,7 +449,7 @@ else if (v < (1 << 7)) {
449449 *
450450 * @param r the integer to be written
451451 * @return this
452- * @throws IOException when underlaying output throws IOException
452+ * @throws IOException when underlying output throws IOException
453453 */
454454 public MessagePacker packInt (int r )
455455 throws IOException
@@ -491,7 +491,7 @@ else if (r < (1 << 16)) {
491491 *
492492 * @param v the integer to be written
493493 * @return this
494- * @throws IOException when underlaying output throws IOException
494+ * @throws IOException when underlying output throws IOException
495495 */
496496 public MessagePacker packLong (long v )
497497 throws IOException
@@ -547,7 +547,7 @@ else if (v < (1 << 7)) {
547547 *
548548 * @param bi the integer to be written
549549 * @return this
550- * @throws IOException when underlaying output throws IOException
550+ * @throws IOException when underlying output throws IOException
551551 */
552552 public MessagePacker packBigInteger (BigInteger bi )
553553 throws IOException
@@ -572,7 +572,7 @@ else if (bi.bitLength() == 64 && bi.signum() == 1) {
572572 *
573573 * @param v the value to be written
574574 * @return this
575- * @throws IOException when underlaying output throws IOException
575+ * @throws IOException when underlying output throws IOException
576576 */
577577 public MessagePacker packFloat (float v )
578578 throws IOException
@@ -589,7 +589,7 @@ public MessagePacker packFloat(float v)
589589 *
590590 * @param v the value to be written
591591 * @return this
592- * @throws IOException when underlaying output throws IOException
592+ * @throws IOException when underlying output throws IOException
593593 */
594594 public MessagePacker packDouble (double v )
595595 throws IOException
@@ -666,7 +666,7 @@ private int encodeStringToBufferAt(int pos, String s)
666666 *
667667 * @param s the string to be written
668668 * @return this
669- * @throws IOException when underlaying output throws IOException
669+ * @throws IOException when underlying output throws IOException
670670 */
671671 public MessagePacker packString (String s )
672672 throws IOException
@@ -755,7 +755,7 @@ else if (s.length() < (1 << 16)) {
755755 *
756756 * @param arraySize number of elements to be written
757757 * @return this
758- * @throws IOException when underlaying output throws IOException
758+ * @throws IOException when underlying output throws IOException
759759 */
760760 public MessagePacker packArrayHeader (int arraySize )
761761 throws IOException
@@ -786,7 +786,7 @@ else if (arraySize < (1 << 16)) {
786786 *
787787 * @param mapSize number of pairs to be written
788788 * @return this
789- * @throws IOException when underlaying output throws IOException
789+ * @throws IOException when underlying output throws IOException
790790 */
791791 public MessagePacker packMapHeader (int mapSize )
792792 throws IOException
@@ -812,7 +812,7 @@ else if (mapSize < (1 << 16)) {
812812 *
813813 * @param v the value to be written
814814 * @return this
815- * @throws IOException when underlaying output throws IOException
815+ * @throws IOException when underlying output throws IOException
816816 */
817817 public MessagePacker packValue (Value v )
818818 throws IOException
@@ -824,12 +824,12 @@ public MessagePacker packValue(Value v)
824824 /**
825825 * Writes header of an Extension value.
826826 * <p>
827- * You will call {@link #writePayload(byte[])} or {@link #addPayload(byte[])} method to write body binary.
827+ * You MUST call {@link #writePayload(byte[])} or {@link #addPayload(byte[])} method to write body binary.
828828 *
829829 * @param extType the extension type tag to be written
830830 * @param payloadLen number of bytes of a payload binary to be written
831831 * @return this
832- * @throws IOException when underlaying output throws IOException
832+ * @throws IOException when underlying output throws IOException
833833 */
834834 public MessagePacker packExtensionTypeHeader (byte extType , int payloadLen )
835835 throws IOException
@@ -877,11 +877,11 @@ else if (payloadLen < (1 << 16)) {
877877 /**
878878 * Writes header of a Binary value.
879879 * <p>
880- * You will call {@link #writePayload(byte[])} or {@link #addPayload(byte[])} method to write body binary.
880+ * You MUST call {@link #writePayload(byte[])} or {@link #addPayload(byte[])} method to write body binary.
881881 *
882882 * @param len number of bytes of a binary to be written
883883 * @return this
884- * @throws IOException when underlaying output throws IOException
884+ * @throws IOException when underlying output throws IOException
885885 */
886886 public MessagePacker packBinaryHeader (int len )
887887 throws IOException
@@ -903,12 +903,12 @@ else if (len < (1 << 16)) {
903903 * <p>
904904 * Length must be number of bytes of a string in UTF-8 encoding.
905905 * <p>
906- * You will call {@link #writePayload(byte[])} or {@link #addPayload(byte[])} method to write body of the
906+ * You MUST call {@link #writePayload(byte[])} or {@link #addPayload(byte[])} method to write body of the
907907 * UTF-8 encoded string.
908908 *
909909 * @param len number of bytes of a UTF-8 string to be written
910910 * @return this
911- * @throws IOException when underlaying output throws IOException
911+ * @throws IOException when underlying output throws IOException
912912 */
913913 public MessagePacker packRawStringHeader (int len )
914914 throws IOException
@@ -935,7 +935,7 @@ else if (len < (1 << 16)) {
935935 *
936936 * @param src the data to add
937937 * @return this
938- * @throws IOException when underlaying output throws IOException
938+ * @throws IOException when underlying output throws IOException
939939 */
940940 public MessagePacker writePayload (byte [] src )
941941 throws IOException
@@ -952,7 +952,7 @@ public MessagePacker writePayload(byte[] src)
952952 * @param off the start offset in the data
953953 * @param len the number of bytes to add
954954 * @return this
955- * @throws IOException when underlaying output throws IOException
955+ * @throws IOException when underlying output throws IOException
956956 */
957957 public MessagePacker writePayload (byte [] src , int off , int len )
958958 throws IOException
@@ -979,7 +979,7 @@ public MessagePacker writePayload(byte[] src, int off, int len)
979979 *
980980 * @param src the data to add
981981 * @return this
982- * @throws IOException when underlaying output throws IOException
982+ * @throws IOException when underlying output throws IOException
983983 */
984984 public MessagePacker addPayload (byte [] src )
985985 throws IOException
@@ -999,7 +999,7 @@ public MessagePacker addPayload(byte[] src)
999999 * @param off the start offset in the data
10001000 * @param len the number of bytes to add
10011001 * @return this
1002- * @throws IOException when underlaying output throws IOException
1002+ * @throws IOException when underlying output throws IOException
10031003 */
10041004 public MessagePacker addPayload (byte [] src , int off , int len )
10051005 throws IOException
0 commit comments