Parent Directory | Revision Log | Patch
revision 1.15.2.5 by gnu_andrew, Sat Feb 19 10:50:37 2005 UTC | revision 1.15.2.6 by tromey, Wed Apr 20 20:23:21 2005 UTC | |
---|---|---|
# | Line 374 public final class Short extends Number | Line 374 public final class Short extends Number |
374 | * Reverse the bytes in val. | * Reverse the bytes in val. |
375 | * @since 1.5 | * @since 1.5 |
376 | */ | */ |
377 | public static short reverseBytes(int val) | public static short reverseBytes(short val) |
378 | { | { |
379 | return (short) (((val >> 8) & 0xff) | ((val << 8) & 0xff00)); | return (short) (((val >> 8) & 0xff) | ((val << 8) & 0xff00)); |
380 | } | } |
|
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |