You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Creates a new instance with the current array appended to the provided data (ie. append at the end).
769
+
* Creates a new instance with the current array appended to the provided data (i.e. append at the end).
770
770
* <p>
771
771
* This will create a new byte array internally, so it is not suitable to use as extensive builder pattern -
772
772
* use {@link ByteBuffer} or {@link java.io.ByteArrayOutputStream} for that.
@@ -779,7 +779,7 @@ public Bytes append(Bytes bytes) {
779
779
}
780
780
781
781
/**
782
-
* Creates a new instance with the current array appended to the provided data (ie. append at the end)
782
+
* Creates a new instance with the current array appended to the provided data (i.e. append at the end)
783
783
*
784
784
* @param singleByte to append
785
785
* @return appended instance
@@ -789,7 +789,7 @@ public Bytes append(byte singleByte) {
789
789
}
790
790
791
791
/**
792
-
* Creates a new instance with the current array appended to the provided data (ie. append at the end)
792
+
* Creates a new instance with the current array appended to the provided data (i.e. append at the end)
793
793
*
794
794
* @param char2Bytes to append
795
795
* @return appended instance
@@ -799,7 +799,7 @@ public Bytes append(char char2Bytes) {
799
799
}
800
800
801
801
/**
802
-
* Creates a new instance with the current array appended to the provided data (ie. append at the end)
802
+
* Creates a new instance with the current array appended to the provided data (i.e. append at the end)
803
803
*
804
804
* @param short2Bytes to append
805
805
* @return appended instance
@@ -809,7 +809,7 @@ public Bytes append(short short2Bytes) {
809
809
}
810
810
811
811
/**
812
-
* Creates a new instance with the current array appended to the provided data (ie. append at the end)
812
+
* Creates a new instance with the current array appended to the provided data (i.e. append at the end)
813
813
*
814
814
* @param integer4Bytes to append
815
815
* @return appended instance
@@ -819,7 +819,7 @@ public Bytes append(int integer4Bytes) {
819
819
}
820
820
821
821
/**
822
-
* Creates a new instance with the current array appended to the provided data (ie. append at the end)
822
+
* Creates a new instance with the current array appended to the provided data (i.e. append at the end)
823
823
*
824
824
* @param long8Bytes to append
825
825
* @return appended instance
@@ -829,7 +829,7 @@ public Bytes append(long long8Bytes) {
829
829
}
830
830
831
831
/**
832
-
* Creates a new instance with the current array appended to the provided data (ie. append at the end).
832
+
* Creates a new instance with the current array appended to the provided data (i.e. append at the end).
833
833
* You may use this to append multiple byte arrays without the need for chaining the {@link #append(byte[])} call
834
834
* and therefore generating intermediate copies of the byte array, making this approach use less memory.
835
835
*
@@ -841,7 +841,7 @@ public Bytes append(byte[]... arrays) {
841
841
}
842
842
843
843
/**
844
-
* Creates a new instance with the current array appended to the provided data (ie. append at the end)
844
+
* Creates a new instance with the current array appended to the provided data (i.e. append at the end)
845
845
*
846
846
* @param secondArray to append
847
847
* @return appended instance
@@ -851,7 +851,7 @@ public Bytes append(byte[] secondArray) {
851
851
}
852
852
853
853
/**
854
-
* Creates a new instance with the current array appended to the provided data (ie. append at the end)
854
+
* Creates a new instance with the current array appended to the provided data (i.e. append at the end)
855
855
* <p>
856
856
* If given array is null, the nothing will be appended.
857
857
*
@@ -1004,7 +1004,7 @@ public Bytes rightShift(int shiftCount) {
1004
1004
}
1005
1005
1006
1006
/**
1007
-
* Returns a Byte whose value is equivalent to this Byte with the designated bit set to newBitValue. Bits start to count from the LSB (ie. Bytes.from(0).switchBit(0,true) == 1)
1007
+
* Returns a Byte whose value is equivalent to this Byte with the designated bit set to newBitValue. Bits start to count from the LSB (i.e. Bytes.from(0).switchBit(0,true) == 1)
1008
1008
*
1009
1009
* @param bitPosition not to confuse with byte position
1010
1010
* @param newBitValue if true set to 1, 0 otherwise
@@ -1063,7 +1063,7 @@ public Bytes reverse() {
1063
1063
* copy but not the original, the copy will contain {@code (byte)0}.
1064
1064
* <p>
1065
1065
* Resize from LSB or length, so an array [0,1,2,3] resized to 3 will result in [1,2,3] or resized to 5 [0,0,1,2,3].
1066
-
* So when a 8 byte value resized to 4 byte will result in the same 32bit integer value
1066
+
* So when an 8 byte value resized to 4 byte will result in the same 32-bit integer value
1067
1067
*
1068
1068
* @param newByteLength the length of the copy to be returned
1069
1069
* @return a copy with the desired size or "this" instance if newByteLength == current length
@@ -1099,7 +1099,7 @@ public Bytes resize(int newByteLength, BytesTransformer.ResizeTransformer.Mode m
1099
1099
* Calculates md5 on the underlying byte array and returns a byte instance containing the hash.
1100
1100
* This hash algorithm SHOULD be supported by every JVM implementation (see
1101
1101
* <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html">Javadoc for MessageDigest</a>)
1102
-
*
1102
+
* <p>
1103
1103
* <strong>Do not use this algorithm in security relevant applications.</strong>
1104
1104
*
1105
1105
* @return md5 (16 bytes) hash of internal byte array
@@ -1114,7 +1114,7 @@ public Bytes hashMd5() {
1114
1114
* Calculates sha1 on the underlying byte array and returns a byte instance containing the hash.
1115
1115
* This hash algorithm SHOULD be supported by every JVM implementation (see
1116
1116
* <a href="https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html">Javadoc for MessageDigest</a>)
1117
-
*
1117
+
* <p>
1118
1118
* <strong>Do not use this algorithm in security relevant applications.</strong>
1119
1119
*
1120
1120
* @return sha1 (20 bytes) hash of internal byte array
@@ -1151,9 +1151,9 @@ public Bytes hash(String algorithm) {
1151
1151
/**
1152
1152
* Generic transformation of this instance.
1153
1153
* <p>
1154
-
* This transformation might be done in-place (ie. without copying the internal array and overwriting its old state),
1154
+
* This transformation might be done in-place (i.e. without copying the internal array and overwriting its old state),
1155
1155
* or on a copy of the internal data, depending on the type (e.g. {@link MutableBytes}) and if the operation can be done
1156
-
* in-place. Therefore the caller has to ensure that certain side-effects, which occur due to the changing of the internal
1156
+
* in-place. Therefore, the caller has to ensure that certain sideeffects, which occur due to the changing of the internal
1157
1157
* data, do not create bugs in his/her code. Usually immutability is preferred, but when handling many or big byte arrays,
0 commit comments