2626/**
2727 * Helps with reading and writing primitive numeric types ({@code short},
2828 * {@code int}, {@code long}, {@code float}, and {@code double}) that are
29- * encoded in little endian using two's complement or unsigned representations.
29+ * encoded in little- endian using two's complement or unsigned representations.
3030 * <p>
3131 * Different computer architectures have different conventions for
3232 * byte ordering. In "Little Endian" architectures (e.g. X86),
3636 * Most methods and classes throughout Java — e.g. {@code DataInputStream} and
3737 * {@code Double.longBitsToDouble()} — assume data is laid out
3838 * in big endian order with the most significant byte first.
39- * The methods in this class read and write data in little endian order,
39+ * The methods in this class read and write data in little- endian order,
4040 * generally by reversing the bytes and then using the
4141 * regular Java methods to convert the swapped bytes to a primitive type.
4242 * </p>
@@ -63,7 +63,7 @@ private static int read(final InputStream input) throws IOException {
6363 }
6464
6565 /**
66- * Reads a little endian {@code double} value from a byte array at a given offset.
66+ * Reads a little- endian {@code double} value from a byte array at a given offset.
6767 *
6868 * @param data source byte array
6969 * @param offset starting offset in the byte array
@@ -75,7 +75,7 @@ public static double readSwappedDouble(final byte[] data, final int offset) {
7575 }
7676
7777 /**
78- * Reads a little endian {@code double} value from an InputStream.
78+ * Reads a little- endian {@code double} value from an InputStream.
7979 *
8080 * @param input source InputStream
8181 * @return the value just read
@@ -86,7 +86,7 @@ public static double readSwappedDouble(final InputStream input) throws IOExcepti
8686 }
8787
8888 /**
89- * Reads a little endian {@code float} value from a byte array at a given offset.
89+ * Reads a little- endian {@code float} value from a byte array at a given offset.
9090 *
9191 * @param data source byte array
9292 * @param offset starting offset in the byte array
@@ -98,7 +98,7 @@ public static float readSwappedFloat(final byte[] data, final int offset) {
9898 }
9999
100100 /**
101- * Reads a little endian {@code float} value from an InputStream.
101+ * Reads a little- endian {@code float} value from an InputStream.
102102 *
103103 * @param input source InputStream
104104 * @return the value just read
@@ -109,7 +109,7 @@ public static float readSwappedFloat(final InputStream input) throws IOException
109109 }
110110
111111 /**
112- * Reads a little endian {@code int} value from a byte array at a given offset.
112+ * Reads a little- endian {@code int} value from a byte array at a given offset.
113113 *
114114 * @param data source byte array
115115 * @param offset starting offset in the byte array
@@ -125,7 +125,7 @@ public static int readSwappedInteger(final byte[] data, final int offset) {
125125 }
126126
127127 /**
128- * Reads a little endian {@code int} value from an InputStream.
128+ * Reads a little- endian {@code int} value from an InputStream.
129129 *
130130 * @param input source InputStream
131131 * @return the value just read
@@ -140,7 +140,7 @@ public static int readSwappedInteger(final InputStream input) throws IOException
140140 }
141141
142142 /**
143- * Reads a little endian {@code long} value from a byte array at a given offset.
143+ * Reads a little- endian {@code long} value from a byte array at a given offset.
144144 *
145145 * @param data source byte array
146146 * @param offset starting offset in the byte array
@@ -155,7 +155,7 @@ public static long readSwappedLong(final byte[] data, final int offset) {
155155 }
156156
157157 /**
158- * Reads a little endian {@code long} value from an InputStream.
158+ * Reads a little- endian {@code long} value from an InputStream.
159159 *
160160 * @param input source InputStream
161161 * @return the value just read
@@ -170,7 +170,7 @@ public static long readSwappedLong(final InputStream input) throws IOException {
170170 }
171171
172172 /**
173- * Reads a little endian {@code short} value from a byte array at a given offset.
173+ * Reads a little- endian {@code short} value from a byte array at a given offset.
174174 *
175175 * @param data source byte array
176176 * @param offset starting offset in the byte array
@@ -183,7 +183,7 @@ public static short readSwappedShort(final byte[] data, final int offset) {
183183 }
184184
185185 /**
186- * Reads a little endian {@code short} value from an InputStream.
186+ * Reads a little- endian {@code short} value from an InputStream.
187187 *
188188 * @param input source InputStream
189189 * @return the value just read
@@ -194,7 +194,7 @@ public static short readSwappedShort(final InputStream input) throws IOException
194194 }
195195
196196 /**
197- * Reads a little endian unsigned integer (32-bit) value from a byte array at a given
197+ * Reads a little- endian unsigned integer (32-bit) value from a byte array at a given
198198 * offset.
199199 *
200200 * @param data source byte array
@@ -212,7 +212,7 @@ public static long readSwappedUnsignedInteger(final byte[] data, final int offse
212212 }
213213
214214 /**
215- * Reads a little endian unsigned integer (32-bit) from an InputStream.
215+ * Reads a little- endian unsigned integer (32-bit) from an InputStream.
216216 *
217217 * @param input source InputStream
218218 * @return the value just read
@@ -229,7 +229,7 @@ public static long readSwappedUnsignedInteger(final InputStream input) throws IO
229229 }
230230
231231 /**
232- * Reads an unsigned short (16-bit) value from a byte array in little endian order at a given
232+ * Reads an unsigned short (16-bit) value from a byte array in little- endian order at a given
233233 * offset.
234234 *
235235 * @param data source byte array
@@ -243,7 +243,7 @@ public static int readSwappedUnsignedShort(final byte[] data, final int offset)
243243 }
244244
245245 /**
246- * Reads an unsigned short (16-bit) from an InputStream in little endian order.
246+ * Reads an unsigned short (16-bit) from an InputStream in little- endian order.
247247 *
248248 * @param input source InputStream
249249 * @return the value just read
@@ -257,7 +257,7 @@ public static int readSwappedUnsignedShort(final InputStream input) throws IOExc
257257 }
258258
259259 /**
260- * Converts a {@code double} value from big endian to little endian
260+ * Converts a {@code double} value from big endian to little- endian
261261 * and vice versa. That is, it converts the {@code double} to bytes,
262262 * reverses the bytes, and then reinterprets those bytes as a new {@code double}.
263263 * This can be useful if you have a number that was read from the
@@ -271,7 +271,7 @@ public static double swapDouble(final double value) {
271271 }
272272
273273 /**
274- * Converts a {@code float} value from big endian to little endian and vice versa.
274+ * Converts a {@code float} value from big endian to little- endian and vice versa.
275275 *
276276 * @param value value to convert
277277 * @return the converted value
@@ -281,7 +281,7 @@ public static float swapFloat(final float value) {
281281 }
282282
283283 /**
284- * Converts an {@code int} value from big endian to little endian and vice versa.
284+ * Converts an {@code int} value from big endian to little- endian and vice versa.
285285 *
286286 * @param value value to convert
287287 * @return the converted value
@@ -295,7 +295,7 @@ public static int swapInteger(final int value) {
295295 }
296296
297297 /**
298- * Converts a {@code long} value from big endian to little endian and vice versa.
298+ * Converts a {@code long} value from big endian to little- endian and vice versa.
299299 *
300300 * @param value value to convert
301301 * @return the converted value
@@ -313,7 +313,7 @@ public static long swapLong(final long value) {
313313 }
314314
315315 /**
316- * Converts a {@code short} value from big endian to little endian and vice versa.
316+ * Converts a {@code short} value from big endian to little- endian and vice versa.
317317 *
318318 * @param value value to convert
319319 * @return the converted value
@@ -338,7 +338,7 @@ private static void validateByteArrayOffset(final byte[] data, final int offset,
338338 }
339339
340340 /**
341- * Writes the 8 bytes of a {@code double} to a byte array at a given offset in little endian order.
341+ * Writes the 8 bytes of a {@code double} to a byte array at a given offset in little- endian order.
342342 *
343343 * @param data target byte array
344344 * @param offset starting offset in the byte array
@@ -350,7 +350,7 @@ public static void writeSwappedDouble(final byte[] data, final int offset, final
350350 }
351351
352352 /**
353- * Writes the 8 bytes of a {@code double} to an output stream in little endian order.
353+ * Writes the 8 bytes of a {@code double} to an output stream in little- endian order.
354354 *
355355 * @param output target OutputStream
356356 * @param value value to write
@@ -361,7 +361,7 @@ public static void writeSwappedDouble(final OutputStream output, final double va
361361 }
362362
363363 /**
364- * Writes the 4 bytes of a {@code float} to a byte array at a given offset in little endian order.
364+ * Writes the 4 bytes of a {@code float} to a byte array at a given offset in little- endian order.
365365 *
366366 * @param data target byte array
367367 * @param offset starting offset in the byte array
@@ -373,7 +373,7 @@ public static void writeSwappedFloat(final byte[] data, final int offset, final
373373 }
374374
375375 /**
376- * Writes the 4 bytes of a {@code float} to an output stream in little endian order.
376+ * Writes the 4 bytes of a {@code float} to an output stream in little- endian order.
377377 *
378378 * @param output target OutputStream
379379 * @param value value to write
@@ -384,7 +384,7 @@ public static void writeSwappedFloat(final OutputStream output, final float valu
384384 }
385385
386386 /**
387- * Writes the 4 bytes of an {@code int} to a byte array at a given offset in little endian order.
387+ * Writes the 4 bytes of an {@code int} to a byte array at a given offset in little- endian order.
388388 *
389389 * @param data target byte array
390390 * @param offset starting offset in the byte array
@@ -400,7 +400,7 @@ public static void writeSwappedInteger(final byte[] data, final int offset, fina
400400 }
401401
402402 /**
403- * Writes the 4 bytes of an {@code int} to an output stream in little endian order.
403+ * Writes the 4 bytes of an {@code int} to an output stream in little- endian order.
404404 *
405405 * @param output target OutputStream
406406 * @param value value to write
@@ -414,7 +414,7 @@ public static void writeSwappedInteger(final OutputStream output, final int valu
414414 }
415415
416416 /**
417- * Writes the 8 bytes of a {@code long} to a byte array at a given offset in little endian order.
417+ * Writes the 8 bytes of a {@code long} to a byte array at a given offset in little- endian order.
418418 *
419419 * @param data target byte array
420420 * @param offset starting offset in the byte array
@@ -434,7 +434,7 @@ public static void writeSwappedLong(final byte[] data, final int offset, final l
434434 }
435435
436436 /**
437- * Writes the 8 bytes of a {@code long} to an output stream in little endian order.
437+ * Writes the 8 bytes of a {@code long} to an output stream in little- endian order.
438438 *
439439 * @param output target OutputStream
440440 * @param value value to write
@@ -452,7 +452,7 @@ public static void writeSwappedLong(final OutputStream output, final long value)
452452 }
453453
454454 /**
455- * Writes the 2 bytes of a {@code short} to a byte array at a given offset in little endian order.
455+ * Writes the 2 bytes of a {@code short} to a byte array at a given offset in little- endian order.
456456 *
457457 * @param data target byte array
458458 * @param offset starting offset in the byte array
@@ -466,7 +466,7 @@ public static void writeSwappedShort(final byte[] data, final int offset, final
466466 }
467467
468468 /**
469- * Writes the 2 bytes of a {@code short} to an output stream using little endian encoding.
469+ * Writes the 2 bytes of a {@code short} to an output stream using little- endian encoding.
470470 *
471471 * @param output target OutputStream
472472 * @param value value to write
0 commit comments