# Class: com.pnfsoftware.jeb.util.primitives.Bytes

Utility methods for `byte`.

## Constructor: Bytes


## Static Method: equals
- parameter: `array1`, type: `byte[]`
- parameter: `pos1`, type: `int`
- parameter: `array2`, type: `byte[]`
- parameter: `pos2`, type: `int`
- parameter: `size`, type: `int`
- return type: `boolean`

Description: Compare byte\-array ranges for equality.
parameter: array1: first byte array
parameter: pos1: start offset in the first array
parameter: array2: second byte array
parameter: pos2: start offset in the second array
parameter: size: number of bytes to compare
return: true if the byte ranges are equal

## Static Method: equals
- parameter: `array1`, type: `byte[]`
- parameter: `array2`, type: `byte[]`
- return type: `boolean`

Description: Compare byte arrays for equality.
parameter: array1: first byte array, may be null
parameter: array2: second byte array, may be null
return: true if both arrays are null or contain the same bytes

## Static Method: indexOf
- parameter: `array`, type: `byte[]`
- parameter: `target`, type: `byte[]`
- return type: `int`

Description: Find the first occurrence of a sequence of bytes.
parameter: array: array to be searched
parameter: target: bytes to be found
return: index \>= 0, or \-1 if not found

## Static Method: indexOf
- parameter: `array`, type: `byte[]`
- parameter: `from`, type: `int`
- parameter: `target`, type: `byte[]`
- return type: `int`

Description: Find the first occurrence of a sequence of bytes.
parameter: array: array to be searched
parameter: from: start index in array
parameter: target: bytes to be found
return: index \>= \`from\`, or \-1 if not found

## Static Method: indexOf
- parameter: `array`, type: `byte[]`
- parameter: `from`, type: `int`
- parameter: `end`, type: `int`
- parameter: `target`, type: `byte[]`
- parameter: `targetFrom`, type: `int`
- parameter: `targetEnd`, type: `int`
- parameter: `targetMask`, type: `byte[]`
- return type: `int`

Description: Find the first occurrence of a sequence of bytes.
parameter: array: array to be searched
parameter: from: start of search
parameter: end: end of search \(exclusive\)
parameter: target: bytes to be found
parameter: targetFrom: actual first target byte in the target array
parameter: targetEnd: actual end \(exclusive\) target byte in the target array
parameter: targetMask: optional binary mask, must be the same length as the target if present; the            indices `targetFrom` and `targetEnd` apply as well
return: index `>= from` and `< end`, or \-1 if not found

## Static Method: lastIndexOf
- parameter: `array`, type: `byte[]`
- parameter: `target`, type: `byte[]`
- return type: `int`

Description: Find the last occurrence of a sequence of bytes.
parameter: array: array to be searched
parameter: target: bytes to be found
return: index \>= 0, or \-1 if not found

## Static Method: lastIndexOf
- parameter: `array`, type: `byte[]`
- parameter: `from`, type: `int`
- parameter: `target`, type: `byte[]`
- return type: `int`

Description: Find the last occurrence of a sequence of bytes.
parameter: array: array to be searched
parameter: from: will search backward from this index
parameter: target: bytes to be found
return: index `<= from`, or \-1 if not found

## Static Method: lastIndexOf
- parameter: `array`, type: `byte[]`
- parameter: `from`, type: `int`
- parameter: `target`, type: `byte[]`
- parameter: `targetMask`, type: `byte[]`
- return type: `int`

Description: Find the last occurrence of a sequence of bytes.
parameter: array: array to be searched
parameter: from: will search backward from this index
parameter: target: bytes to be found
parameter: targetMask: optional binary mask, must be the same length as the target if present
return: index `<= from`, or \-1 if not found

## Static Method: toUnsignedString
- parameter: `value`, type: `byte`
- return type: `java.lang.String`

Description: Convert a byte to its unsigned decimal string representation.
parameter: value: byte value
return: the unsigned decimal representation of `value`

