aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/common/util/ByteUtil.java
diff options
context:
space:
mode:
authorJ08nY2018-10-15 18:16:03 +0200
committerJ08nY2018-10-15 18:16:03 +0200
commitee13937d70383e925cf32858e73d89a6c18bf7f0 (patch)
treefa3f8dfd255b8a24d15dd1734fe327df56b8ac2c /src/cz/crcs/ectester/common/util/ByteUtil.java
parentd24630d759bb16f715564ab80a5d4447f57d03f2 (diff)
parentea4e807906815c16c62c4e5719950c7274d1ebab (diff)
downloadECTester-ee13937d70383e925cf32858e73d89a6c18bf7f0.tar.gz
ECTester-ee13937d70383e925cf32858e73d89a6c18bf7f0.tar.zst
ECTester-ee13937d70383e925cf32858e73d89a6c18bf7f0.zip
Merge branch 'devel'
Diffstat (limited to 'src/cz/crcs/ectester/common/util/ByteUtil.java')
-rw-r--r--src/cz/crcs/ectester/common/util/ByteUtil.java7
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.
*/