Рефакторинг
This commit is contained in:
@@ -5,11 +5,11 @@ import lombok.experimental.UtilityClass;
|
||||
@UtilityClass
|
||||
public class Bytes {
|
||||
|
||||
public static int indexOf(byte[] array, byte[] target) {
|
||||
public int indexOf(byte[] array, byte[] target) {
|
||||
return indexOf(array, target, 0, array.length);
|
||||
}
|
||||
|
||||
public static int indexOf(byte[] array, byte[] target, int start, int end) {
|
||||
public int indexOf(byte[] array, byte[] target, int start, int end) {
|
||||
if (target.length == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Optional;
|
||||
@UtilityClass
|
||||
public class PacketUtils {
|
||||
|
||||
public static Optional<byte[]> mergePackets(List<Packet> cut) {
|
||||
public Optional<byte[]> mergePackets(List<Packet> cut) {
|
||||
return cut.stream()
|
||||
.map(Packet::getContent)
|
||||
.reduce(ArrayUtils::addAll);
|
||||
|
||||
Reference in New Issue
Block a user