diff options
| author | J08nY | 2018-08-12 14:08:57 +0200 |
|---|---|---|
| committer | J08nY | 2018-08-12 14:08:57 +0200 |
| commit | 574a46017950e4e04b9e52cb52c74ad9948060cb (patch) | |
| tree | e861c90f483a8a5dc29523c14496ccf7d4189eda /src/cz/crcs/ectester/common/util/ByteUtil.java | |
| parent | fb19b67c5f707af80cba280efa0ae0fa20d7fc8f (diff) | |
| download | ECTester-574a46017950e4e04b9e52cb52c74ad9948060cb.tar.gz ECTester-574a46017950e4e04b9e52cb52c74ad9948060cb.tar.zst ECTester-574a46017950e4e04b9e52cb52c74ad9948060cb.zip | |
Diffstat (limited to 'src/cz/crcs/ectester/common/util/ByteUtil.java')
| -rw-r--r-- | src/cz/crcs/ectester/common/util/ByteUtil.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cz/crcs/ectester/common/util/ByteUtil.java b/src/cz/crcs/ectester/common/util/ByteUtil.java index daacabb..4b4a2d6 100644 --- a/src/cz/crcs/ectester/common/util/ByteUtil.java +++ b/src/cz/crcs/ectester/common/util/ByteUtil.java @@ -10,6 +10,7 @@ public class ByteUtil { /** * Gen a short from a byte array at <code>offset</code>, big-endian. + * * @return the short value */ public static short getShort(byte[] array, int offset) { @@ -26,6 +27,7 @@ public class ByteUtil { /** * Compare two byte arrays upto <code>length</code> and get first difference. + * * @return the position of the first difference in the two byte arrays, or <code>length</code> if they are equal. */ public static int diffBytes(byte[] one, int oneOffset, byte[] other, int otherOffset, int length) { @@ -41,6 +43,7 @@ public class ByteUtil { /** * Compare two byte arrays, upto <code>length</code>. + * * @return whether the arrays are equal upto <code>length</code> */ public static boolean compareBytes(byte[] one, int oneOffset, byte[] other, int otherOffset, int length) { @@ -77,6 +80,7 @@ public class ByteUtil { /** * Parse a hex string into a byte array, big-endian. + * * @param hex The String to parse. * @return the byte array from the hex string. */ @@ -86,7 +90,8 @@ public class ByteUtil { /** * Parse a hex string into a byte-array, specify endianity. - * @param hex The String to parse. + * + * @param hex The String to parse. * @param bigEndian Whether to parse as big-endian. * @return the byte array from the hex string. */ |
