@@ -109,10 +109,10 @@ public static float readSwappedFloat(final InputStream input) throws IOException
109109 * @return the value read
110110 */
111111 public static int readSwappedInteger (final byte [] data , final int offset ) {
112- return ( ( ( data [ offset + 0 ] & 0xff ) << 0 ) +
112+ return ( ( data [ offset + 0 ] & 0xff ) << 0 ) +
113113 ( ( data [ offset + 1 ] & 0xff ) << 8 ) +
114114 ( ( data [ offset + 2 ] & 0xff ) << 16 ) +
115- ( ( data [ offset + 3 ] & 0xff ) << 24 ) ) ;
115+ ( ( data [ offset + 3 ] & 0xff ) << 24 );
116116 }
117117
118118 // ========================================== Swapping read/write routines
@@ -193,9 +193,9 @@ public static short readSwappedShort(final InputStream input) throws IOException
193193 * @return the value read
194194 */
195195 public static long readSwappedUnsignedInteger (final byte [] data , final int offset ) {
196- final long low = ( ( ( data [ offset + 0 ] & 0xff ) << 0 ) +
196+ final long low = ( ( data [ offset + 0 ] & 0xff ) << 0 ) +
197197 ( ( data [ offset + 1 ] & 0xff ) << 8 ) +
198- ( ( data [ offset + 2 ] & 0xff ) << 16 ) ) ;
198+ ( ( data [ offset + 2 ] & 0xff ) << 16 );
199199
200200 final long high = data [ offset + 3 ] & 0xff ;
201201
@@ -215,7 +215,7 @@ public static long readSwappedUnsignedInteger(final InputStream input) throws IO
215215 final int value3 = read (input );
216216 final int value4 = read (input );
217217
218- final long low = ((( value1 & 0xff ) << 0 ) + ((value2 & 0xff ) << 8 ) + ((value3 & 0xff ) << 16 ) );
218+ final long low = ((value1 & 0xff ) << 0 ) + ((value2 & 0xff ) << 8 ) + ((value3 & 0xff ) << 16 );
219219
220220 final long high = value4 & 0xff ;
221221
@@ -231,8 +231,8 @@ public static long readSwappedUnsignedInteger(final InputStream input) throws IO
231231 * @return the value read
232232 */
233233 public static int readSwappedUnsignedShort (final byte [] data , final int offset ) {
234- return ( ( ( data [ offset + 0 ] & 0xff ) << 0 ) +
235- ( ( data [ offset + 1 ] & 0xff ) << 8 ) ) ;
234+ return ( ( data [ offset + 0 ] & 0xff ) << 0 ) +
235+ ( ( data [ offset + 1 ] & 0xff ) << 8 );
236236 }
237237
238238 /**
@@ -246,7 +246,7 @@ public static int readSwappedUnsignedShort(final InputStream input) throws IOExc
246246 final int value1 = read (input );
247247 final int value2 = read (input );
248248
249- return ((( value1 & 0xff ) << 0 ) + ((value2 & 0xff ) << 8 ) );
249+ return ((value1 & 0xff ) << 0 ) + ((value2 & 0xff ) << 8 );
250250 }
251251
252252 /**
@@ -274,10 +274,10 @@ public static float swapFloat(final float value) {
274274 */
275275 public static int swapInteger (final int value ) {
276276 return
277- ( ( ( value >> 0 ) & 0xff ) << 24 ) +
278- ( ( ( value >> 8 ) & 0xff ) << 16 ) +
279- ( ( ( value >> 16 ) & 0xff ) << 8 ) +
280- ( ( ( value >> 24 ) & 0xff ) << 0 );
277+ ( ( value >> 0 & 0xff ) << 24 ) +
278+ ( ( value >> 8 & 0xff ) << 16 ) +
279+ ( ( value >> 16 & 0xff ) << 8 ) +
280+ ( ( value >> 24 & 0xff ) << 0 );
281281 }
282282
283283 /**
@@ -287,14 +287,14 @@ public static int swapInteger(final int value) {
287287 */
288288 public static long swapLong (final long value ) {
289289 return
290- ( ( ( value >> 0 ) & 0xff ) << 56 ) +
291- ( ( ( value >> 8 ) & 0xff ) << 48 ) +
292- ( ( ( value >> 16 ) & 0xff ) << 40 ) +
293- ( ( ( value >> 24 ) & 0xff ) << 32 ) +
294- ( ( ( value >> 32 ) & 0xff ) << 24 ) +
295- ( ( ( value >> 40 ) & 0xff ) << 16 ) +
296- ( ( ( value >> 48 ) & 0xff ) << 8 ) +
297- ( ( ( value >> 56 ) & 0xff ) << 0 );
290+ ( ( value >> 0 & 0xff ) << 56 ) +
291+ ( ( value >> 8 & 0xff ) << 48 ) +
292+ ( ( value >> 16 & 0xff ) << 40 ) +
293+ ( ( value >> 24 & 0xff ) << 32 ) +
294+ ( ( value >> 32 & 0xff ) << 24 ) +
295+ ( ( value >> 40 & 0xff ) << 16 ) +
296+ ( ( value >> 48 & 0xff ) << 8 ) +
297+ ( ( value >> 56 & 0xff ) << 0 );
298298 }
299299
300300 /**
@@ -303,8 +303,8 @@ public static long swapLong(final long value) {
303303 * @return the converted value
304304 */
305305 public static short swapShort (final short value ) {
306- return (short ) ( ( ( ( value >> 0 ) & 0xff ) << 8 ) +
307- ( ( ( value >> 8 ) & 0xff ) << 0 ) );
306+ return (short ) ( ( ( value >> 0 & 0xff ) << 8 ) +
307+ ( ( value >> 8 & 0xff ) << 0 ) );
308308 }
309309
310310 /**
@@ -359,10 +359,10 @@ public static void writeSwappedFloat(final OutputStream output, final float valu
359359 * @param value value to write
360360 */
361361 public static void writeSwappedInteger (final byte [] data , final int offset , final int value ) {
362- data [ offset + 0 ] = (byte )( ( value >> 0 ) & 0xff );
363- data [ offset + 1 ] = (byte )( ( value >> 8 ) & 0xff );
364- data [ offset + 2 ] = (byte )( ( value >> 16 ) & 0xff );
365- data [ offset + 3 ] = (byte )( ( value >> 24 ) & 0xff );
362+ data [ offset + 0 ] = (byte )( value >> 0 & 0xff );
363+ data [ offset + 1 ] = (byte )( value >> 8 & 0xff );
364+ data [ offset + 2 ] = (byte )( value >> 16 & 0xff );
365+ data [ offset + 3 ] = (byte )( value >> 24 & 0xff );
366366 }
367367
368368 /**
@@ -373,10 +373,10 @@ public static void writeSwappedInteger(final byte[] data, final int offset, fina
373373 * @throws IOException in case of an I/O problem
374374 */
375375 public static void writeSwappedInteger (final OutputStream output , final int value ) throws IOException {
376- output .write ((byte ) (( value >> 0 ) & 0xff ));
377- output .write ((byte ) (( value >> 8 ) & 0xff ));
378- output .write ((byte ) (( value >> 16 ) & 0xff ));
379- output .write ((byte ) (( value >> 24 ) & 0xff ));
376+ output .write ((byte ) (value >> 0 & 0xff ));
377+ output .write ((byte ) (value >> 8 & 0xff ));
378+ output .write ((byte ) (value >> 16 & 0xff ));
379+ output .write ((byte ) (value >> 24 & 0xff ));
380380 }
381381
382382 /**
@@ -387,14 +387,14 @@ public static void writeSwappedInteger(final OutputStream output, final int valu
387387 * @param value value to write
388388 */
389389 public static void writeSwappedLong (final byte [] data , final int offset , final long value ) {
390- data [ offset + 0 ] = (byte )( ( value >> 0 ) & 0xff );
391- data [ offset + 1 ] = (byte )( ( value >> 8 ) & 0xff );
392- data [ offset + 2 ] = (byte )( ( value >> 16 ) & 0xff );
393- data [ offset + 3 ] = (byte )( ( value >> 24 ) & 0xff );
394- data [ offset + 4 ] = (byte )( ( value >> 32 ) & 0xff );
395- data [ offset + 5 ] = (byte )( ( value >> 40 ) & 0xff );
396- data [ offset + 6 ] = (byte )( ( value >> 48 ) & 0xff );
397- data [ offset + 7 ] = (byte )( ( value >> 56 ) & 0xff );
390+ data [ offset + 0 ] = (byte )( value >> 0 & 0xff );
391+ data [ offset + 1 ] = (byte )( value >> 8 & 0xff );
392+ data [ offset + 2 ] = (byte )( value >> 16 & 0xff );
393+ data [ offset + 3 ] = (byte )( value >> 24 & 0xff );
394+ data [ offset + 4 ] = (byte )( value >> 32 & 0xff );
395+ data [ offset + 5 ] = (byte )( value >> 40 & 0xff );
396+ data [ offset + 6 ] = (byte )( value >> 48 & 0xff );
397+ data [ offset + 7 ] = (byte )( value >> 56 & 0xff );
398398 }
399399
400400 /**
@@ -405,14 +405,14 @@ public static void writeSwappedLong(final byte[] data, final int offset, final l
405405 * @throws IOException in case of an I/O problem
406406 */
407407 public static void writeSwappedLong (final OutputStream output , final long value ) throws IOException {
408- output .write ((byte ) (( value >> 0 ) & 0xff ));
409- output .write ((byte ) (( value >> 8 ) & 0xff ));
410- output .write ((byte ) (( value >> 16 ) & 0xff ));
411- output .write ((byte ) (( value >> 24 ) & 0xff ));
412- output .write ((byte ) (( value >> 32 ) & 0xff ));
413- output .write ((byte ) (( value >> 40 ) & 0xff ));
414- output .write ((byte ) (( value >> 48 ) & 0xff ));
415- output .write ((byte ) (( value >> 56 ) & 0xff ));
408+ output .write ((byte ) (value >> 0 & 0xff ));
409+ output .write ((byte ) (value >> 8 & 0xff ));
410+ output .write ((byte ) (value >> 16 & 0xff ));
411+ output .write ((byte ) (value >> 24 & 0xff ));
412+ output .write ((byte ) (value >> 32 & 0xff ));
413+ output .write ((byte ) (value >> 40 & 0xff ));
414+ output .write ((byte ) (value >> 48 & 0xff ));
415+ output .write ((byte ) (value >> 56 & 0xff ));
416416 }
417417
418418 /**
@@ -423,8 +423,8 @@ public static void writeSwappedLong(final OutputStream output, final long value)
423423 * @param value value to write
424424 */
425425 public static void writeSwappedShort (final byte [] data , final int offset , final short value ) {
426- data [ offset + 0 ] = (byte )( ( value >> 0 ) & 0xff );
427- data [ offset + 1 ] = (byte )( ( value >> 8 ) & 0xff );
426+ data [ offset + 0 ] = (byte )( value >> 0 & 0xff );
427+ data [ offset + 1 ] = (byte )( value >> 8 & 0xff );
428428 }
429429
430430 /**
@@ -435,8 +435,8 @@ public static void writeSwappedShort(final byte[] data, final int offset, final
435435 * @throws IOException in case of an I/O problem
436436 */
437437 public static void writeSwappedShort (final OutputStream output , final short value ) throws IOException {
438- output .write ((byte ) (( value >> 0 ) & 0xff ));
439- output .write ((byte ) (( value >> 8 ) & 0xff ));
438+ output .write ((byte ) (value >> 0 & 0xff ));
439+ output .write ((byte ) (value >> 8 & 0xff ));
440440 }
441441
442442 /**
0 commit comments